summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMenglong Dong <imagedong@tencent.com>2022-02-05 10:47:36 +0300
committerDavid S. Miller <davem@davemloft.net>2022-02-07 14:18:49 +0300
commitc1f166d1f7eef212096a98b22f5acf92f9af353d (patch)
tree52c4dd2b708fe6c37bf7f84e8f96f11fdced798b /include/linux
parent33cba42985c8144eef78d618fc1e51aaa074b169 (diff)
downloadlinux-c1f166d1f7eef212096a98b22f5acf92f9af353d.tar.xz
net: ipv4: use kfree_skb_reason() in ip_rcv_finish_core()
Replace kfree_skb() with kfree_skb_reason() in ip_rcv_finish_core(), following drop reasons are introduced: SKB_DROP_REASON_IP_RPFILTER SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST 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')
-rw-r--r--include/linux/skbuff.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 8e82130b3c52..4baba45f223d 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -330,6 +330,15 @@ enum skb_drop_reason {
* IP header (see
* IPSTATS_MIB_INHDRERRORS)
*/
+ SKB_DROP_REASON_IP_RPFILTER, /* IP rpfilter validate failed.
+ * see the document for rp_filter
+ * in ip-sysctl.rst for more
+ * information
+ */
+ SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST, /* destination address of L2
+ * is multicast, but L3 is
+ * unicast.
+ */
SKB_DROP_REASON_MAX,
};