summaryrefslogtreecommitdiffstats
path: root/include/net/ipv6_frag.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-10-29 15:45:19 +0000
committerJakub Kicinski <kuba@kernel.org>2022-10-31 20:14:27 -0700
commit77adfd3a1d44c4730fd2af99b497e04ddc2b5837 (patch)
treeeb26860a030aa1cdf4915654d8eef6b339625402 /include/net/ipv6_frag.h
parent4ecbb1c27c363686d11a241cd682a454a8454c2b (diff)
downloadlinux-77adfd3a1d44c4730fd2af99b497e04ddc2b5837.tar.bz2
net: dropreason: add SKB_DROP_REASON_FRAG_REASM_TIMEOUT
Used to track skbs freed after a timeout happened in a reassmbly unit. Passing a @reason argument to inet_frag_rbtree_purge() allows to use correct consumed status for frags that have been successfully re-assembled. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/ipv6_frag.h')
-rw-r--r--include/net/ipv6_frag.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ipv6_frag.h b/include/net/ipv6_frag.h
index 5052c66e22d2..7321ffe3a108 100644
--- a/include/net/ipv6_frag.h
+++ b/include/net/ipv6_frag.h
@@ -76,6 +76,7 @@ ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq)
if (fq->q.flags & INET_FRAG_COMPLETE)
goto out;
+ fq->q.flags |= INET_FRAG_DROP;
inet_frag_kill(&fq->q);
dev = dev_get_by_index_rcu(net, fq->iif);
@@ -101,7 +102,7 @@ ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq)
spin_unlock(&fq->q.lock);
icmpv6_send(head, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0);
- kfree_skb(head);
+ kfree_skb_reason(head, SKB_DROP_REASON_FRAG_REASM_TIMEOUT);
goto out_rcu_unlock;
out: