Michal Kubecek b09fe1
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
Michal Kubecek b09fe1
Date: Fri, 10 Nov 2017 14:03:51 -0800
Michal Kubecek b09fe1
Subject: net: Remove unused skb_shared_info member
Michal Kubecek b09fe1
Patch-mainline: v4.15-rc1
Michal Kubecek b09fe1
Git-commit: 39b175211053c7a6a4d794c42e225994f1c069c2
Michal Kubecek b09fe1
References: bsc#1066757
Michal Kubecek b09fe1
Michal Kubecek b09fe1
ip6_frag_id was only used by UFO, which has been removed.
Michal Kubecek b09fe1
ipv6_proxy_select_ident() only existed to set ip6_frag_id and has no
Michal Kubecek b09fe1
in-tree callers.
Michal Kubecek b09fe1
Michal Kubecek b09fe1
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Michal Kubecek b09fe1
Signed-off-by: David S. Miller <davem@davemloft.net>
Michal Kubecek b09fe1
Acked-by: Michal Kubecek <mkubecek@suse.cz>
Michal Kubecek b09fe1
Michal Kubecek b09fe1
---
Michal Kubecek b09fe1
 include/linux/skbuff.h |  1 -
Michal Kubecek b09fe1
 include/net/ipv6.h     |  1 -
Michal Kubecek b09fe1
 net/ipv6/output_core.c | 31 -------------------------------
Michal Kubecek b09fe1
 3 files changed, 33 deletions(-)
Michal Kubecek b09fe1
Michal Kubecek b09fe1
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
Michal Kubecek b09fe1
index a6162fba327b..b20e4dcbcda1 100644
Michal Kubecek b09fe1
--- a/include/linux/skbuff.h
Michal Kubecek b09fe1
+++ b/include/linux/skbuff.h
Michal Kubecek b09fe1
@@ -425,7 +425,6 @@ struct skb_shared_info {
Michal Kubecek b09fe1
 	struct skb_shared_hwtstamps hwtstamps;
Michal Kubecek b09fe1
 	unsigned int	gso_type;
Michal Kubecek b09fe1
 	u32		tskey;
Michal Kubecek b09fe1
-	__be32          ip6_frag_id;
Michal Kubecek b09fe1
 
Michal Kubecek b09fe1
 	/*
Michal Kubecek b09fe1
 	 * Warning : all fields before dataref are cleared in __alloc_skb()
Michal Kubecek b09fe1
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
Michal Kubecek b09fe1
index 3e505bbff8ca..305b136ccfcf 100644
Michal Kubecek b09fe1
--- a/include/net/ipv6.h
Michal Kubecek b09fe1
+++ b/include/net/ipv6.h
Michal Kubecek b09fe1
@@ -726,7 +726,6 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
Michal Kubecek b09fe1
 __be32 ipv6_select_ident(struct net *net,
Michal Kubecek b09fe1
 			 const struct in6_addr *daddr,
Michal Kubecek b09fe1
 			 const struct in6_addr *saddr);
Michal Kubecek b09fe1
-void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb);
Michal Kubecek b09fe1
 
Michal Kubecek b09fe1
 int ip6_dst_hoplimit(struct dst_entry *dst);
Michal Kubecek b09fe1
 
Michal Kubecek b09fe1
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
Michal Kubecek b09fe1
index a338bbc33cf3..4a7e5ffa5108 100644
Michal Kubecek b09fe1
--- a/net/ipv6/output_core.c
Michal Kubecek b09fe1
+++ b/net/ipv6/output_core.c
Michal Kubecek b09fe1
@@ -31,37 +31,6 @@ static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,
Michal Kubecek b09fe1
 	return id;
Michal Kubecek b09fe1
 }
Michal Kubecek b09fe1
 
Michal Kubecek b09fe1
-/* This function exists only for tap drivers that must support broken
Michal Kubecek b09fe1
- * clients requesting UFO without specifying an IPv6 fragment ID.
Michal Kubecek b09fe1
- *
Michal Kubecek b09fe1
- * This is similar to ipv6_select_ident() but we use an independent hash
Michal Kubecek b09fe1
- * seed to limit information leakage.
Michal Kubecek b09fe1
- *
Michal Kubecek b09fe1
- * The network header must be set before calling this.
Michal Kubecek b09fe1
- */
Michal Kubecek b09fe1
-void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
Michal Kubecek b09fe1
-{
Michal Kubecek b09fe1
-	static u32 ip6_proxy_idents_hashrnd __read_mostly;
Michal Kubecek b09fe1
-	struct in6_addr buf[2];
Michal Kubecek b09fe1
-	struct in6_addr *addrs;
Michal Kubecek b09fe1
-	u32 id;
Michal Kubecek b09fe1
-
Michal Kubecek b09fe1
-	addrs = skb_header_pointer(skb,
Michal Kubecek b09fe1
-				   skb_network_offset(skb) +
Michal Kubecek b09fe1
-				   offsetof(struct ipv6hdr, saddr),
Michal Kubecek b09fe1
-				   sizeof(buf), buf);
Michal Kubecek b09fe1
-	if (!addrs)
Michal Kubecek b09fe1
-		return;
Michal Kubecek b09fe1
-
Michal Kubecek b09fe1
-	net_get_random_once(&ip6_proxy_idents_hashrnd,
Michal Kubecek b09fe1
-			    sizeof(ip6_proxy_idents_hashrnd));
Michal Kubecek b09fe1
-
Michal Kubecek b09fe1
-	id = __ipv6_select_ident(net, ip6_proxy_idents_hashrnd,
Michal Kubecek b09fe1
-				 &addrs[1], &addrs[0]);
Michal Kubecek b09fe1
-	skb_shinfo(skb)->ip6_frag_id = htonl(id);
Michal Kubecek b09fe1
-}
Michal Kubecek b09fe1
-EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
Michal Kubecek b09fe1
-
Michal Kubecek b09fe1
 __be32 ipv6_select_ident(struct net *net,
Michal Kubecek b09fe1
 			 const struct in6_addr *daddr,
Michal Kubecek b09fe1
 			 const struct in6_addr *saddr)
Michal Kubecek b09fe1
-- 
Michal Kubecek b09fe1
2.15.1
Michal Kubecek b09fe1