summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/net/ipv6.h1
-rw-r--r--net/ipv6/output_core.c31
3 files changed, 0 insertions, 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 {
500 struct skb_shared_hwtstamps hwtstamps; 500 struct skb_shared_hwtstamps hwtstamps;
501 unsigned int gso_type; 501 unsigned int gso_type;
502 u32 tskey; 502 u32 tskey;
503 __be32 ip6_frag_id;
504 503
505 /* 504 /*
506 * Warning : all fields before dataref are cleared in __alloc_skb() 505 * 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
767__be32 ipv6_select_ident(struct net *net, 767__be32 ipv6_select_ident(struct net *net,
768 const struct in6_addr *daddr, 768 const struct in6_addr *daddr,
769 const struct in6_addr *saddr); 769 const struct in6_addr *saddr);
770void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb);
771 770
772int ip6_dst_hoplimit(struct dst_entry *dst); 771int ip6_dst_hoplimit(struct dst_entry *dst);
773 772
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,
31 return id; 31 return id;
32} 32}
33 33
34/* This function exists only for tap drivers that must support broken
35 * clients requesting UFO without specifying an IPv6 fragment ID.
36 *
37 * This is similar to ipv6_select_ident() but we use an independent hash
38 * seed to limit information leakage.
39 *
40 * The network header must be set before calling this.
41 */
42void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
43{
44 static u32 ip6_proxy_idents_hashrnd __read_mostly;
45 struct in6_addr buf[2];
46 struct in6_addr *addrs;
47 u32 id;
48
49 addrs = skb_header_pointer(skb,
50 skb_network_offset(skb) +
51 offsetof(struct ipv6hdr, saddr),
52 sizeof(buf), buf);
53 if (!addrs)
54 return;
55
56 net_get_random_once(&ip6_proxy_idents_hashrnd,
57 sizeof(ip6_proxy_idents_hashrnd));
58
59 id = __ipv6_select_ident(net, ip6_proxy_idents_hashrnd,
60 &addrs[1], &addrs[0]);
61 skb_shinfo(skb)->ip6_frag_id = htonl(id);
62}
63EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
64
65__be32 ipv6_select_ident(struct net *net, 34__be32 ipv6_select_ident(struct net *net,
66 const struct in6_addr *daddr, 35 const struct in6_addr *daddr,
67 const struct in6_addr *saddr) 36 const struct in6_addr *saddr)