summaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-09-26 20:37:05 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-27 20:40:19 +0200
commit174e23810cd3183dc2ca3f5166ef965a55eaaf54 (patch)
treea9ffbf41f4c75ccef3332330253b37e21a84104f /net/core/skbuff.c
parent6b3656a60f2067738d1a423328199720806f0c44 (diff)
downloadlinux-174e23810cd3183dc2ca3f5166ef965a55eaaf54.tar.gz
linux-174e23810cd3183dc2ca3f5166ef965a55eaaf54.tar.bz2
linux-174e23810cd3183dc2ca3f5166ef965a55eaaf54.zip
sk_buff: drop all skb extensions on free and skb scrubbing
Now that we have a 3rd extension, add a new helper that drops the extension space and use it when we need to scrub an sk_buff. At this time, scrubbing clears secpath and bridge netfilter data, but retains the tc skb extension, after this patch all three get cleared. NAPI reuse/free assumes we can only have a secpath attached to skb, but it seems better to clear all extensions there as well. v2: add unlikely hint (Eric Dumazet) Fixes: 95a7233c452a ("net: openvswitch: Set OvS recirc_id from tc chain index") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index f12e8a050edb..01d65206f4fb 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5119,7 +5119,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
skb->skb_iif = 0;
skb->ignore_df = 0;
skb_dst_drop(skb);
- secpath_reset(skb);
+ skb_ext_reset(skb);
nf_reset(skb);
nf_reset_trace(skb);