[PATCH] net: Remove unused skb_shared_info member

2017-11-10 Thread Mat Martineau
ip6_frag_id was only used by UFO, which has been removed.
ipv6_proxy_select_ident() only existed to set ip6_frag_id and has no
in-tree callers.

Signed-off-by: Mat Martineau 
---
 include/linux/skbuff.h |  1 -
 include/net/ipv6.h |  1 -
 net/ipv6/output_core.c | 31 ---
 3 files changed, 33 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 57d712671081..54fe91183a8e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -500,7 +500,6 @@ struct skb_shared_info {
struct skb_shared_hwtstamps hwtstamps;
unsigned intgso_type;
u32 tskey;
-   __be32  ip6_frag_id;
 
/*
 * Warning : all fields before dataref are cleared in __alloc_skb()
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index fb6d67012de6..ec14f0d5a3a1 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -767,7 +767,6 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, 
const struct in6_add
 __be32 ipv6_select_ident(struct net *net,
 const struct in6_addr *daddr,
 const struct in6_addr *saddr);
-void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb);
 
 int ip6_dst_hoplimit(struct dst_entry *dst);
 
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
index a338bbc33cf3..4a7e5ffa5108 100644
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -31,37 +31,6 @@ static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,
return id;
 }
 
-/* This function exists only for tap drivers that must support broken
- * clients requesting UFO without specifying an IPv6 fragment ID.
- *
- * This is similar to ipv6_select_ident() but we use an independent hash
- * seed to limit information leakage.
- *
- * The network header must be set before calling this.
- */
-void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
-{
-   static u32 ip6_proxy_idents_hashrnd __read_mostly;
-   struct in6_addr buf[2];
-   struct in6_addr *addrs;
-   u32 id;
-
-   addrs = skb_header_pointer(skb,
-  skb_network_offset(skb) +
-  offsetof(struct ipv6hdr, saddr),
-  sizeof(buf), buf);
-   if (!addrs)
-   return;
-
-   net_get_random_once(&ip6_proxy_idents_hashrnd,
-   sizeof(ip6_proxy_idents_hashrnd));
-
-   id = __ipv6_select_ident(net, ip6_proxy_idents_hashrnd,
-&addrs[1], &addrs[0]);
-   skb_shinfo(skb)->ip6_frag_id = htonl(id);
-}
-EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
-
 __be32 ipv6_select_ident(struct net *net,
 const struct in6_addr *daddr,
 const struct in6_addr *saddr)
-- 
2.15.0



Re: [PATCH] net: Remove unused skb_shared_info member

2017-11-11 Thread David Miller
From: Mat Martineau 
Date: Fri, 10 Nov 2017 14:03:51 -0800

> ip6_frag_id was only used by UFO, which has been removed.
> ipv6_proxy_select_ident() only existed to set ip6_frag_id and has no
> in-tree callers.
> 
> Signed-off-by: Mat Martineau 

Applied to net-next, thanks.