diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-02-05 15:47:34 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-07 11:18:49 +0000 |
commit | 2df3041ba3be950376e8c25a8f6da22f7fcc765c (patch) | |
tree | 2a325cd70314507138627c9ecd7ab01c491322a4 /net | |
parent | 88590b369354092183bcba04e2368010c462557f (diff) |
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')
-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; |