diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-02-05 15:47:35 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-07 11:18:49 +0000 |
commit | 33cba42985c8144eef78d618fc1e51aaa074b169 (patch) | |
tree | 80cafa612b8048e554cce205ab3a378c4e833af7 /include/linux/skbuff.h | |
parent | net: netfilter: use kfree_drop_reason() for NF_DROP (diff) | |
download | linux-33cba42985c8144eef78d618fc1e51aaa074b169.tar.gz linux-33cba42985c8144eef78d618fc1e51aaa074b169.tar.bz2 linux-33cba42985c8144eef78d618fc1e51aaa074b169.zip |
net: ipv4: use kfree_skb_reason() in ip_rcv_core()
Replace kfree_skb() with kfree_skb_reason() in ip_rcv_core(). Three new
drop reasons are introduced:
SKB_DROP_REASON_OTHERHOST
SKB_DROP_REASON_IP_CSUM
SKB_DROP_REASON_IP_INHDR
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9060159b4375..8e82130b3c52 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -321,6 +321,15 @@ enum skb_drop_reason { SKB_DROP_REASON_SOCKET_FILTER, /* dropped by socket filter */ SKB_DROP_REASON_UDP_CSUM, /* UDP checksum error */ SKB_DROP_REASON_NETFILTER_DROP, /* dropped by netfilter */ + SKB_DROP_REASON_OTHERHOST, /* packet don't belong to current + * host (interface is in promisc + * mode) + */ + SKB_DROP_REASON_IP_CSUM, /* IP checksum error */ + SKB_DROP_REASON_IP_INHDR, /* there is something wrong with + * IP header (see + * IPSTATS_MIB_INHDRERRORS) + */ SKB_DROP_REASON_MAX, }; |