Skip to contentSkip to conversation

net: ip6 defrag: backport fixes

PATCH In review Peter Oskolkov 4 participants 13 messages Apr 26, 2019 – Apr 30, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover net: ip6 defrag: backport fixes

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#1 lore raw

PATCH 1/5 ipv6: frags: fix a lockdep false positive

From: Eric Dumazet <[email protected]>

[ Upstream commit 415787d7799f4fccbe8d49cb0b8e5811be6b0389 ]

lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes.

It complains because of following chains :

1) sch_direct_xmit() (lock txq->_xmit_lock)

    dev_hard_start_xmit()
     xmit_one()
      dev_queue_xmit_nit()
       packet_rcv_fanout()
        ip_check_defrag()
         ip_defrag()
          spin_lock()     (lock frag queue spinlock)

2) ip6_input_finish()

    ipv6_frag_rcv()       (lock frag queue spinlock)
     ip6_frag_queue()
      icmpv6_param_prob() (lock txq->_xmit_lock at some point)

We could add lockdep annotations, but we also can make sure IPv6 calls icmpv6_param_prob() only after the release of the frag queue spinlock, since this naturally makes frag queue spinlock a leaf in lock hierarchy.

---
 net/ipv6/reassembly.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)
net/ipv6/reassembly.c +12 -11
index 74ffbcb306a6..64c8f20d3c41 100644
@@ -169,7 +169,8 @@ fq_find(struct net *net, __be32 id, const struct ipv6hdr *hdr, int iif)
 }
 
 static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
-			   struct frag_hdr *fhdr, int nhoff)
+			  struct frag_hdr *fhdr, int nhoff,
+			  u32 *prob_offset)
 {
 	struct sk_buff *prev, *next;
 	struct net_device *dev;
@@ -185,11 +186,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
 			((u8 *)(fhdr + 1) - (u8 *)(ipv6_hdr(skb) + 1)));
 
 	if ((unsigned int)end > IPV6_MAXPLEN) {
-		__IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
-				IPSTATS_MIB_INHDRERRORS);
-		icmpv6_param_prob(skb, ICMPV6_HDR_FIELD,
-				  ((u8 *)&fhdr->frag_off -
-				   skb_network_header(skb)));
+		*prob_offset = (u8 *)&fhdr->frag_off - skb_network_header(skb);
 		return -1;
 	}
 
@@ -220,10 +217,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
 			/* RFC2460 says always send parameter problem in
 			 * this case. -DaveM
 			 */
-			__IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
-					IPSTATS_MIB_INHDRERRORS);
-			icmpv6_param_prob(skb, ICMPV6_HDR_FIELD,
-					  offsetof(struct ipv6hdr, payload_len));
+			*prob_offset = offsetof(struct ipv6hdr, payload_len);
 			return -1;
 		}
 		if (end > fq->q.len) {
@@ -524,15 +518,22 @@ static int ipv6_frag_rcv(struct sk_buff *skb)
 	iif = skb->dev ? skb->dev->ifindex : 0;
 	fq = fq_find(net, fhdr->identification, hdr, iif);
 	if (fq) {
+		u32 prob_offset = 0;
 		int ret;
 
 		spin_lock(&fq->q.lock);
 
 		fq->iif = iif;
-		ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff);
+		ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff,
+				     &prob_offset);
 
 		spin_unlock(&fq->q.lock);
 		inet_frag_put(&fq->q);
+		if (prob_offset) {
+			__IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
+					IPSTATS_MIB_INHDRERRORS);
+			icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, prob_offset);
+		}
 		return ret;
 	}
 
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#2 lore raw

PATCH 2/5 net: IP defrag: encapsulate rbtree defrag code into callable functions

In reply to Peter Oskolkov

[ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ]

This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code.

Cc Eric Dumazet <[email protected]>
Cc Florian Westphal <[email protected]>
Cc Tom Herbert <[email protected]>
---
 include/net/inet_frag.h  |  16 ++-
 net/ipv4/inet_fragment.c | 293 ++++++++++++++++++++++++++++++++++++++
 net/ipv4/ip_fragment.c   | 295 +++++----------------------------------
 3 files changed, 342 insertions(+), 262 deletions(-)
include/net/inet_frag.h +14 -2
index a3812e9c8fee..c2c724abde57 100644
@@ -76,8 +76,8 @@ struct inet_frag_queue {
 	struct timer_list	timer;
 	spinlock_t		lock;
 	atomic_t		refcnt;
-	struct sk_buff		*fragments;  /* Used in IPv6. */
-	struct rb_root		rb_fragments; /* Used in IPv4. */
+	struct sk_buff		*fragments;  /* used in 6lopwpan IPv6. */
+	struct rb_root		rb_fragments; /* Used in IPv4/IPv6. */
 	struct sk_buff		*fragments_tail;
 	struct sk_buff		*last_run_head;
 	ktime_t			stamp;
@@ -152,4 +152,16 @@ static inline void add_frag_mem_limit(struct netns_frags *nf, long val)
 
 extern const u8 ip_frag_ecn_table[16];
 
+/* Return values of inet_frag_queue_insert() */
+#define IPFRAG_OK	0
+#define IPFRAG_DUP	1
+#define IPFRAG_OVERLAP	2
+int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
+			   int offset, int end);
+void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
+			      struct sk_buff *parent);
+void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head,
+			    void *reasm_data);
+struct sk_buff *inet_frag_pull_head(struct inet_frag_queue *q);
+
 #endif
net/ipv4/inet_fragment.c +293 -0

308 lines not on this page · raw message

net/ipv4/ip_fragment.c +35 -260

393 lines not on this page · raw message

Signature · 1 line
2.21.0.593.g511ec345e18-goog
#3 lore raw

PATCH 3/5 ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

In reply to Peter Oskolkov

From: Florian Westphal <[email protected]>

[ Upstream commit 70b095c84326640eeacfd69a411db8fc36e8ab1a ]

IPV6=m
DEFRAG_IPV6=m
CONNTRACK=y yields:

net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get':
net/netfilter/nf_conntrack_proto.c:802: undefined reference to nf_defrag_ipv6_enable' net/netfilter/nf_conntrack_proto.o:(.rodata+0x640): undefined reference to nf_conntrack_l4proto_icmpv6'

Setting DEFRAG_IPV6=y causes undefined references to ip6_rhash_params ip6_frag_init and ip6_expire_frag_queue so it would be needed to force IPV6=y too.

This patch gets rid of the 'followup linker error' by removing the dependency of ipv6.ko symbols from netfilter ipv6 defrag.

Shared code is placed into a header, then used from both.

---
 include/net/ipv6.h                        |  29 ------
 include/net/ipv6_frag.h                   | 104 ++++++++++++++++++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c   |  17 ++--
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     |  92 ++-----------------
 net/openvswitch/conntrack.c               |   1 +
 7 files changed, 126 insertions(+), 122 deletions(-)
 create mode 100644 include/net/ipv6_frag.h
include/net/ipv6.h +0 -29
index 7cb100d25bb5..168009eef5e4 100644
@@ -511,35 +511,6 @@ static inline bool ipv6_prefix_equal(const struct in6_addr *addr1,
 }
 #endif
 
-struct inet_frag_queue;
-
-enum ip6_defrag_users {
-	IP6_DEFRAG_LOCAL_DELIVER,
-	IP6_DEFRAG_CONNTRACK_IN,
-	__IP6_DEFRAG_CONNTRACK_IN	= IP6_DEFRAG_CONNTRACK_IN + USHRT_MAX,
-	IP6_DEFRAG_CONNTRACK_OUT,
-	__IP6_DEFRAG_CONNTRACK_OUT	= IP6_DEFRAG_CONNTRACK_OUT + USHRT_MAX,
-	IP6_DEFRAG_CONNTRACK_BRIDGE_IN,
-	__IP6_DEFRAG_CONNTRACK_BRIDGE_IN = IP6_DEFRAG_CONNTRACK_BRIDGE_IN + USHRT_MAX,
-};
-
-void ip6_frag_init(struct inet_frag_queue *q, const void *a);
-extern const struct rhashtable_params ip6_rhash_params;
-
-/*
- *	Equivalent of ipv4 struct ip
- */
-struct frag_queue {
-	struct inet_frag_queue	q;
-
-	int			iif;
-	unsigned int		csum;
-	__u16			nhoffset;
-	u8			ecn;
-};
-
-void ip6_expire_frag_queue(struct net *net, struct frag_queue *fq);
-
 static inline bool ipv6_addr_any(const struct in6_addr *a)
 {
 #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64
include/net/ipv6_frag.h new file +104 -0

104 lines not on this page · raw message

net/ieee802154/6lowpan/reassembly.c +1 -1
index aab1e2dfdfca..c01df341b5f6 100644
@@ -25,7 +25,7 @@
 
 #include <net/ieee802154_netdev.h>
 #include <net/6lowpan.h>
-#include <net/ipv6.h>
+#include <net/ipv6_frag.h>
 #include <net/inet_frag.h>
 
 #include "6lowpan_i.h"
net/ipv6/netfilter/nf_conntrack_reasm.c +12 -5
index e46185377981..033f44493a10 100644
@@ -33,9 +33,8 @@
 
 #include <net/sock.h>
 #include <net/snmp.h>
-#include <net/inet_frag.h>
+#include <net/ipv6_frag.h>
 
-#include <net/ipv6.h>
 #include <net/protocol.h>
 #include <net/transp_v6.h>
 #include <net/rawv6.h>
@@ -158,7 +157,7 @@ static void nf_ct_frag6_expire(unsigned long data)
 	fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
 	net = container_of(fq->q.net, struct net, nf_frag.frags);
 
-	ip6_expire_frag_queue(net, fq);
+	ip6frag_expire_frag_queue(net, fq);
 }
 
 /* Creation primitives. */
@@ -634,16 +633,24 @@ static struct pernet_operations nf_ct_net_ops = {
 	.exit = nf_ct_net_exit,
 };
 
+static const struct rhashtable_params nfct_rhash_params = {
+	.head_offset		= offsetof(struct inet_frag_queue, node),
+	.hashfn			= ip6frag_key_hashfn,
+	.obj_hashfn		= ip6frag_obj_hashfn,
+	.obj_cmpfn		= ip6frag_obj_cmpfn,
+	.automatic_shrinking	= true,
+};
+
 int nf_ct_frag6_init(void)
 {
 	int ret = 0;
 
-	nf_frags.constructor = ip6_frag_init;
+	nf_frags.constructor = ip6frag_init;
 	nf_frags.destructor = NULL;
 	nf_frags.qsize = sizeof(struct frag_queue);
 	nf_frags.frag_expire = nf_ct_frag6_expire;
 	nf_frags.frags_cache_name = nf_frags_cache_name;
-	nf_frags.rhash_params = ip6_rhash_params;
+	nf_frags.rhash_params = nfct_rhash_params;
 	ret = inet_frags_init(&nf_frags);
 	if (ret)
 		goto out;
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c +1 -2
index f06b0471f39f..c4070e9c4260 100644
@@ -14,8 +14,7 @@
 #include <linux/skbuff.h>
 #include <linux/icmp.h>
 #include <linux/sysctl.h>
-#include <net/ipv6.h>
-#include <net/inet_frag.h>
+#include <net/ipv6_frag.h>
 
 #include <linux/netfilter_ipv6.h>
 #include <linux/netfilter_bridge.h>
net/ipv6/reassembly.c +7 -85

124 lines not on this page · raw message

net/openvswitch/conntrack.c +1 -0
index f135814c34ad..02d6f38f7869 100644
@@ -23,6 +23,7 @@
 #include <net/netfilter/nf_conntrack_seqadj.h>
 #include <net/netfilter/nf_conntrack_zones.h>
 #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
+#include <net/ipv6_frag.h>
 
 #ifdef CONFIG_NF_NAT_NEEDED
 #include <linux/netfilter/nf_nat.h>
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#4 lore raw

PATCH 4/5 net: IP6 defrag: use rbtrees for IPv6 defrag

In reply to Peter Oskolkov

[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ]

Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see
commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu")

This behavior is not specified in IPv6 RFCs and appears to break compatibility with some IPv6 implemenations, as reported here:
https://www.spinics.net/lists/netdev/msg543846.html

This patch re-uses common IP defragmentation queueing and reassembly code in IPv6, removing the 1280 byte restriction.

---
 include/net/ipv6_frag.h |  11 +-
 net/ipv6/reassembly.c   | 246 ++++++++++++----------------------------
 2 files changed, 81 insertions(+), 176 deletions(-)
include/net/ipv6_frag.h +9 -2
index 6ced1e6899b6..28aa9b30aece 100644
@@ -82,8 +82,15 @@ ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq)
 	__IP6_INC_STATS(net, __in6_dev_get(dev), IPSTATS_MIB_REASMTIMEOUT);
 
 	/* Don't send error if the first segment did not arrive. */
-	head = fq->q.fragments;
-	if (!(fq->q.flags & INET_FRAG_FIRST_IN) || !head)
+	if (!(fq->q.flags & INET_FRAG_FIRST_IN))
+		goto out;
+
+	/* sk_buff::dev and sk_buff::rbnode are unionized. So we
+	 * pull the head out of the tree in order to be able to
+	 * deal with head->dev.
+	 */
+	head = inet_frag_pull_head(&fq->q);
+	if (!head)
 		goto out;
 
 	head->dev = dev;
net/ipv6/reassembly.c +72 -174

381 lines not on this page · raw message

Signature · 1 line
2.21.0.593.g511ec345e18-goog
#5 lore raw

PATCH 5/5 net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

In reply to Peter Oskolkov

[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ]

Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see
commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu")

This behavior is not specified in IPv6 RFCs and appears to break compatibility with some IPv6 implemenations, as reported here:
https://www.spinics.net/lists/netdev/msg543846.html

This patch re-uses common IP defragmentation queueing and reassembly code in IP6 defragmentation in nf_conntrack, removing the 1280 byte restriction.

---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 256 +++++++-----------------
 1 file changed, 72 insertions(+), 184 deletions(-)
net/ipv6/netfilter/nf_conntrack_reasm.c +72 -184
index 033f44493a10..1e1fa99b3243 100644
@@ -51,14 +51,6 @@
 
 static const char nf_frags_cache_name[] = "nf-frags";
 
-struct nf_ct_frag6_skb_cb
-{
-	struct inet6_skb_parm	h;
-	int			offset;
-};
-
-#define NFCT_FRAG6_CB(skb)	((struct nf_ct_frag6_skb_cb *)((skb)->cb))
-
 static struct inet_frags nf_frags;
 
 #ifdef CONFIG_SYSCTL
@@ -144,6 +136,9 @@ static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
 }
 #endif
 
+static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
+			     struct sk_buff *prev_tail, struct net_device *dev);
+
 static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
 {
 	return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
@@ -184,9 +179,10 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 			     const struct frag_hdr *fhdr, int nhoff)
 {
-	struct sk_buff *prev, *next;
 	unsigned int payload_len;
-	int offset, end;
+	struct net_device *dev;
+	struct sk_buff *prev;
+	int offset, end, err;
 	u8 ecn;
 
 	if (fq->q.flags & INET_FRAG_COMPLETE) {
@@ -261,55 +257,19 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 		goto err;
 	}
 
-	/* Find out which fragments are in front and at the back of us
-	 * in the chain of fragments so far.  We must know where to put
-	 * this fragment, right?
-	 */
+	/* Note : skb->rbnode and skb->dev share the same location. */
+	dev = skb->dev;
+	/* Makes sure compiler wont do silly aliasing games */
+	barrier();
+
 	prev = fq->q.fragments_tail;
-	if (!prev || NFCT_FRAG6_CB(prev)->offset < offset) {
-		next = NULL;
-		goto found;
-	}
-	prev = NULL;
-	for (next = fq->q.fragments; next != NULL; next = next->next) {
-		if (NFCT_FRAG6_CB(next)->offset >= offset)
-			break;	/* bingo! */
-		prev = next;
-	}
+	err = inet_frag_queue_insert(&fq->q, skb, offset, end);
+	if (err)
+		goto insert_error;
 
-found:
-	/* RFC5722, Section 4:
-	 *                                  When reassembling an IPv6 datagram, if
-	 *   one or more its constituent fragments is determined to be an
-	 *   overlapping fragment, the entire datagram (and any constituent
-	 *   fragments, including those not yet received) MUST be silently
-	 *   discarded.
-	 */
+	if (dev)
+		fq->iif = dev->ifindex;
 
-	/* Check for overlap with preceding fragment. */
-	if (prev &&
-	    (NFCT_FRAG6_CB(prev)->offset + prev->len) > offset)
-		goto discard_fq;
-
-	/* Look for overlap with succeeding segment. */
-	if (next && NFCT_FRAG6_CB(next)->offset < end)
-		goto discard_fq;
-
-	NFCT_FRAG6_CB(skb)->offset = offset;
-
-	/* Insert this fragment in the chain of fragments. */
-	skb->next = next;
-	if (!next)
-		fq->q.fragments_tail = skb;
-	if (prev)
-		prev->next = skb;
-	else
-		fq->q.fragments = skb;
-
-	if (skb->dev) {
-		fq->iif = skb->dev->ifindex;
-		skb->dev = NULL;
-	}
 	fq->q.stamp = skb->tstamp;
 	fq->q.meat += skb->len;
 	fq->ecn |= ecn;
@@ -325,11 +285,25 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 		fq->q.flags |= INET_FRAG_FIRST_IN;
 	}
 
-	return 0;
+	if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
+	    fq->q.meat == fq->q.len) {
+		unsigned long orefdst = skb->_skb_refdst;
 
-discard_fq:
+		skb->_skb_refdst = 0UL;
+		err = nf_ct_frag6_reasm(fq, skb, prev, dev);
+		skb->_skb_refdst = orefdst;
+		return err;
+	}
+
+	skb_dst_drop(skb);
+	return -EINPROGRESS;
+
+insert_error:
+	if (err == IPFRAG_DUP)
+		goto err;
 	inet_frag_kill(&fq->q);
 err:
+	skb_dst_drop(skb);
 	return -EINVAL;
 }
 
@@ -339,141 +313,67 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
  *	It is called with locked fq, and caller must check that
  *	queue is eligible for reassembly i.e. it is not COMPLETE,
  *	the last and the first frames arrived and all the bits are here.
- *
- *	returns true if *prev skb has been transformed into the reassembled
- *	skb, false otherwise.
  */
-static bool
-nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *prev,  struct net_device *dev)
+static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
+			     struct sk_buff *prev_tail, struct net_device *dev)
 {
-	struct sk_buff *fp, *head = fq->q.fragments;
-	int    payload_len;
+	void *reasm_data;
+	int payload_len;
 	u8 ecn;
 
 	inet_frag_kill(&fq->q);
 
-	WARN_ON(head == NULL);
-	WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
-
 	ecn = ip_frag_ecn_table[fq->ecn];
 	if (unlikely(ecn == 0xff))
-		return false;
+		goto err;
+
+	reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
+	if (!reasm_data)
+		goto err;
 
-	/* Unfragmented part is taken from the first segment. */
-	payload_len = ((head->data - skb_network_header(head)) -
+	payload_len = ((skb->data - skb_network_header(skb)) -
 		       sizeof(struct ipv6hdr) + fq->q.len -
 		       sizeof(struct frag_hdr));
 	if (payload_len > IPV6_MAXPLEN) {
 		net_dbg_ratelimited("nf_ct_frag6_reasm: payload len = %d\n",
 				    payload_len);
-		return false;
-	}
-
-	/* Head of list must not be cloned. */
-	if (skb_unclone(head, GFP_ATOMIC))
-		return false;
-
-	/* If the first fragment is fragmented itself, we split
-	 * it to two chunks: the first with data and paged part
-	 * and the second, holding only fragments. */
-	if (skb_has_frag_list(head)) {
-		struct sk_buff *clone;
-		int i, plen = 0;
-
-		clone = alloc_skb(0, GFP_ATOMIC);
-		if (clone == NULL)
-			return false;
-
-		clone->next = head->next;
-		head->next = clone;
-		skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list;
-		skb_frag_list_init(head);
-		for (i = 0; i < skb_shinfo(head)->nr_frags; i++)
-			plen += skb_frag_size(&skb_shinfo(head)->frags[i]);
-		clone->len = clone->data_len = head->data_len - plen;
-		head->data_len -= clone->len;
-		head->len -= clone->len;
-		clone->csum = 0;
-		clone->ip_summed = head->ip_summed;
-
-		add_frag_mem_limit(fq->q.net, clone->truesize);
-	}
-
-	/* morph head into last received skb: prev.
-	 *
-	 * This allows callers of ipv6 conntrack defrag to continue
-	 * to use the last skb(frag) passed into the reasm engine.
-	 * The last skb frag 'silently' turns into the full reassembled skb.
-	 *
-	 * Since prev is also part of q->fragments we have to clone it first.
-	 */
-	if (head != prev) {
-		struct sk_buff *iter;
-
-		fp = skb_clone(prev, GFP_ATOMIC);
-		if (!fp)
-			return false;
-
-		fp->next = prev->next;
-
-		iter = head;
-		while (iter) {
-			if (iter->next == prev) {
-				iter->next = fp;
-				break;
-			}
-			iter = iter->next;
-		}
-
-		skb_morph(prev, head);
-		prev->next = head->next;
-		consume_skb(head);
-		head = prev;
+		goto err;
 	}
 
 	/* We have to remove fragment header from datagram and to relocate
 	 * header in order to calculate ICV correctly. */
-	skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0];
-	memmove(head->head + sizeof(struct frag_hdr), head->head,
-		(head->data - head->head) - sizeof(struct frag_hdr));
-	head->mac_header += sizeof(struct frag_hdr);
-	head->network_header += sizeof(struct frag_hdr);
-
-	skb_shinfo(head)->frag_list = head->next;
-	skb_reset_transport_header(head);
-	skb_push(head, head->data - skb_network_header(head));
-
-	for (fp = head->next; fp; fp = fp->next) {
-		head->data_len += fp->len;
-		head->len += fp->len;
-		if (head->ip_summed != fp->ip_summed)
-			head->ip_summed = CHECKSUM_NONE;
-		else if (head->ip_summed == CHECKSUM_COMPLETE)
-			head->csum = csum_add(head->csum, fp->csum);
-		head->truesize += fp->truesize;
-		fp->sk = NULL;
-	}
-	sub_frag_mem_limit(fq->q.net, head->truesize);
+	skb_network_header(skb)[fq->nhoffset] = skb_transport_header(skb)[0];
+	memmove(skb->head + sizeof(struct frag_hdr), skb->head,
+		(skb->data - skb->head) - sizeof(struct frag_hdr));
+	skb->mac_header += sizeof(struct frag_hdr);
+	skb->network_header += sizeof(struct frag_hdr);
+
+	skb_reset_transport_header(skb);
+
+	inet_frag_reasm_finish(&fq->q, skb, reasm_data);
 
-	head->ignore_df = 1;
-	head->next = NULL;
-	head->dev = dev;
-	head->tstamp = fq->q.stamp;
-	ipv6_hdr(head)->payload_len = htons(payload_len);
-	ipv6_change_dsfield(ipv6_hdr(head), 0xff, ecn);
-	IP6CB(head)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
+	skb->ignore_df = 1;
+	skb->dev = dev;
+	ipv6_hdr(skb)->payload_len = htons(payload_len);
+	ipv6_change_dsfield(ipv6_hdr(skb), 0xff, ecn);
+	IP6CB(skb)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
 
 	/* Yes, and fold redundant checksum back. 8) */
-	if (head->ip_summed == CHECKSUM_COMPLETE)
-		head->csum = csum_partial(skb_network_header(head),
-					  skb_network_header_len(head),
-					  head->csum);
+	if (skb->ip_summed == CHECKSUM_COMPLETE)
+		skb->csum = csum_partial(skb_network_header(skb),
+					 skb_network_header_len(skb),
+					 skb->csum);
 
 	fq->q.fragments = NULL;
 	fq->q.rb_fragments = RB_ROOT;
 	fq->q.fragments_tail = NULL;
+	fq->q.last_run_head = NULL;
 
-	return true;
+	return 0;
+
+err:
+	inet_frag_kill(&fq->q);
+	return -EINVAL;
 }
 
 /*
@@ -542,7 +442,6 @@ find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff)
 int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
 {
 	u16 savethdr = skb->transport_header;
-	struct net_device *dev = skb->dev;
 	int fhoff, nhoff, ret;
 	struct frag_hdr *fhdr;
 	struct frag_queue *fq;
@@ -565,10 +464,6 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
 	hdr = ipv6_hdr(skb);
 	fhdr = (struct frag_hdr *)skb_transport_header(skb);
 
-	if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
-	    fhdr->frag_off & htons(IP6_MF))
-		return -EINVAL;
-
 	skb_orphan(skb);
 	fq = fq_find(net, fhdr->identification, user, hdr,
 		     skb->dev ? skb->dev->ifindex : 0);
@@ -580,24 +475,17 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
 	spin_lock_bh(&fq->q.lock);
 
 	ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff);
-	if (ret < 0) {
-		if (ret == -EPROTO) {
-			skb->transport_header = savethdr;
-			ret = 0;
-		}
-		goto out_unlock;
+	if (ret == -EPROTO) {
+		skb->transport_header = savethdr;
+		ret = 0;
 	}
 
 	/* after queue has assumed skb ownership, only 0 or -EINPROGRESS
 	 * must be returned.
 	 */
-	ret = -EINPROGRESS;
-	if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
-	    fq->q.meat == fq->q.len &&
-	    nf_ct_frag6_reasm(fq, skb, dev))
-		ret = 0;
+	if (ret)
+		ret = -EINPROGRESS;
 
-out_unlock:
 	spin_unlock_bh(&fq->q.lock);
 	inet_frag_put(&fq->q);
 	return ret;
Signature · 1 line
2.21.0.593.g511ec345e18-goog
#6 lore raw
In reply to Peter Oskolkov
Quoted 7 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

Quoted 6 lines

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

FYI: I have a patchset that backports these into 4.4, but things got much hairier
there, as I needed to backport three additional netfilter patches. So I'm not going to send the patchset to the lists unless there is a real need and somebody with enough knowledge of netfitler volunteers to review/test it (I tested that IP defrag works, but there are netfilter-related pieces that
I understand little about).

Quoted 29 lines

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog

#8 lore raw
In reply to Peter Oskolkov

Thanks Peter!
I have your patch for 4.14 running now.
Then I'll run this patch for 4.9.
I'll report the results by Monday.
--John Masinter

Quoted 42 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog

#7 lore raw
In reply to Peter Oskolkov

My $.02 I do not see 4.4 used much in my circles. We do not use it anywhere at McAfee.

Quoted 53 lines · Peter Oskolkov
Quoted 7 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

Quoted 6 lines

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

FYI: I have a patchset that backports these into 4.4, but things got much hairier
there, as I needed to backport three additional netfilter patches. So I'm not going to send the patchset to the lists unless there is a real need and somebody with enough knowledge of netfitler volunteers to review/test it (I tested that IP defrag works, but there are netfilter-related pieces that
I understand little about).

Quoted 29 lines

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog

#9 lore raw
In reply to Peter Oskolkov

I have run the 4.9 patch set on the full TAHI test sweet. Similar to 4.14, it does fix all the IPv6 frag header issues. But the "change MTU" mesg routing is still broken. Overall, it fixes what it was intended to fix, so I suggest it move toward release.
Thanks Peter!

--John Masinter

Quoted 42 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog

#10 lore raw

Hi Peter,

I forgot to mention one thing about the 4.9 patch set. When patching against 4.9.170, I had to remove a couple of snippets that were already in release:

Patch #604 (linux-4.9-4-ip6-defrag-use-rbtrees.patch):
+ /usr/bin/cat /home/admin/WORK/os/PACKAGES/kernel49/WORK/linux-4.9-4-ip6-defrag-use-rbtrees.patch
+ /usr/bin/patch -p1 -b --suffix .ip6-4 --fuzz=0
patching file include/net/ipv6_frag.h
patching file net/ipv6/reassembly.c
Hunk #10 FAILED at 357.
Hunk #11 succeeded at 374 (offset -4 lines).
1 out of 11 hunks FAILED -- saving rejects to file net/ipv6/reassembly.c.rej

ipv6/reassembly.c +0 -4
@@ -357,10 +258,6 @@
                return 1;
        }
 
-       if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
-           fhdr->frag_off & htons(IP6_MF))
-               goto fail_hdr;
-
        iif = skb->dev ? skb->dev->ifindex : 0;
        fq = fq_find(net, fhdr->identification, hdr, iif);
        if (fq) {

Patch #605 (linux-4.9-5-ip6-defrag-use-rbtrees-in-nf_conntrack_reasm.patch):
+ /usr/bin/cat /home/admin/WORK/os/PACKAGES/kernel49/WORK/linux-4.9-5-ip6-defrag-use-rbtrees-in-nf_conntrack_reasm.patch
+ /usr/bin/patch -p1 -b --suffix .ip6-5 --fuzz=0
patching file net/ipv6/netfilter/nf_conntrack_reasm.c
Hunk #8 FAILED at 464.
Hunk #9 succeeded at 475 (offset -4 lines).
1 out of 9 hunks FAILED -- saving rejects to file
net/ipv6/netfilter/nf_conntrack_reasm.c.rej

ipv6/netfilter/nf_conntrack_reasm.c +0 -4
@@ -464,10 +363,6 @@
        hdr = ipv6_hdr(skb);
        fhdr = (struct frag_hdr *)skb_transport_header(skb);
 
-       if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
-           fhdr->frag_off & htons(IP6_MF))
-               return -EINVAL;
-
        skb_orphan(skb);
        fq = fq_find(net, fhdr->identification, user, hdr,
                     skb->dev ? skb->dev->ifindex : 0);
Quoted 53 lines · Captain Wiggum

I have run the 4.9 patch set on the full TAHI test sweet. Similar to 4.14, it does fix all the IPv6 frag header issues. But the "change MTU" mesg routing is still broken. Overall, it fixes what it was intended to fix, so I suggest it move toward release.
Thanks Peter!

--John Masinter

Quoted 42 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog

#11 lore raw
Quoted 6 lines · Captain Wiggum

Hi Peter,

I forgot to mention one thing about the 4.9 patch set. When patching against 4.9.170, I had to remove a couple of snippets that were already in release:

Hi John, I see these checks still present in 4.4.171. Maybe you had them removed in
your local branch?

Quoted 101 lines

Patch #604 (linux-4.9-4-ip6-defrag-use-rbtrees.patch):
+ /usr/bin/cat /home/admin/WORK/os/PACKAGES/kernel49/WORK/linux-4.9-4-ip6-defrag-use-rbtrees.patch
+ /usr/bin/patch -p1 -b --suffix .ip6-4 --fuzz=0
patching file include/net/ipv6_frag.h
patching file net/ipv6/reassembly.c
Hunk #10 FAILED at 357.
Hunk #11 succeeded at 374 (offset -4 lines).
1 out of 11 hunks FAILED -- saving rejects to file net/ipv6/reassembly.c.rej

ipv6/reassembly.c +0 -4
@@ -357,10 +258,6 @@
                return 1;
        }
 
-       if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
-           fhdr->frag_off & htons(IP6_MF))
-               goto fail_hdr;
-
        iif = skb->dev ? skb->dev->ifindex : 0;
        fq = fq_find(net, fhdr->identification, hdr, iif);
        if (fq) {

Patch #605 (linux-4.9-5-ip6-defrag-use-rbtrees-in-nf_conntrack_reasm.patch):
+ /usr/bin/cat /home/admin/WORK/os/PACKAGES/kernel49/WORK/linux-4.9-5-ip6-defrag-use-rbtrees-in-nf_conntrack_reasm.patch
+ /usr/bin/patch -p1 -b --suffix .ip6-5 --fuzz=0
patching file net/ipv6/netfilter/nf_conntrack_reasm.c
Hunk #8 FAILED at 464.
Hunk #9 succeeded at 475 (offset -4 lines).
1 out of 9 hunks FAILED -- saving rejects to file
net/ipv6/netfilter/nf_conntrack_reasm.c.rej

ipv6/netfilter/nf_conntrack_reasm.c +0 -4
@@ -464,10 +363,6 @@
        hdr = ipv6_hdr(skb);
        fhdr = (struct frag_hdr *)skb_transport_header(skb);
 
-       if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
-           fhdr->frag_off & htons(IP6_MF))
-               return -EINVAL;
-
        skb_orphan(skb);
        fq = fq_find(net, fhdr->identification, user, hdr,
                     skb->dev ? skb->dev->ifindex : 0);
Quoted 53 lines · Captain Wiggum

I have run the 4.9 patch set on the full TAHI test sweet. Similar to 4.14, it does fix all the IPv6 frag header issues. But the "change MTU" mesg routing is still broken. Overall, it fixes what it was intended to fix, so I suggest it move toward release.
Thanks Peter!

--John Masinter

Quoted 42 lines · Peter Oskolkov

This is a backport of a 5.1rc patchset:
https://patchwork.ozlabs.org/cover/1029418/

Which was backported into 4.19:
https://patchwork.ozlabs.org/cover/1081619/

and into 4.14:
https://patchwork.ozlabs.org/cover/1089651/

This 4.9 patchset is very close to the 4.14 patchset above (cherry-picks from 4.14 were almost clean).

Eric Dumazet (1):
ipv6: frags: fix a lockdep false positive

Florian Westphal (1):
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

Peter Oskolkov (3):
net: IP defrag: encapsulate rbtree defrag code into callable functions
net: IP6 defrag: use rbtrees for IPv6 defrag
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

 include/net/inet_frag.h                   |  16 +-
 include/net/ipv6.h                        |  29 --
 include/net/ipv6_frag.h                   | 111 +++++++
 net/ieee802154/6lowpan/reassembly.c       |   2 +-
 net/ipv4/inet_fragment.c                  | 293 ++++++++++++++++++
 net/ipv4/ip_fragment.c                    | 295 +++---------------
 net/ipv6/netfilter/nf_conntrack_reasm.c   | 273 +++++-----------
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |   3 +-
 net/ipv6/reassembly.c                     | 361 ++++++----------------
 net/openvswitch/conntrack.c               |   1 +
 10 files changed, 631 insertions(+), 753 deletions(-)
 create mode 100644 include/net/ipv6_frag.h

--
2.21.0.593.g511ec345e18-goog