diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-02-05 10:47:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-07 14:18:49 +0300 |
commit | 2df3041ba3be950376e8c25a8f6da22f7fcc765c (patch) | |
tree | 2a325cd70314507138627c9ecd7ab01c491322a4 /net/netfilter/core.c | |
parent | 88590b369354092183bcba04e2368010c462557f (diff) | |
download | linux-2df3041ba3be950376e8c25a8f6da22f7fcc765c.tar.xz |
net: netfilter: use kfree_drop_reason() for NF_DROP
Replace kfree_skb() with kfree_skb_reason() in nf_hook_slow() when
skb is dropped by reason of NF_DROP. Following new drop reasons
are introduced:
SKB_DROP_REASON_NETFILTER_DROP
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/core.c')
-rw-r--r-- | net/netfilter/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 354cb472f386..d1c9dfbb11fa 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c @@ -621,7 +621,8 @@ int nf_hook_slow(struct sk_buff *skb, struct nf_hook_state *state, case NF_ACCEPT: break; case NF_DROP: - kfree_skb(skb); + kfree_skb_reason(skb, + SKB_DROP_REASON_NETFILTER_DROP); ret = NF_DROP_GETERR(verdict); if (ret == 0) ret = -EPERM; |