aboutsummaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorGravatar Menglong Dong <imagedong@tencent.com> 2022-04-13 16:15:55 +0800
committerGravatar David S. Miller <davem@davemloft.net> 2022-04-13 13:09:57 +0100
commit2edc1a383fda8d2f580216292dfd9daeae691e47 (patch)
tree0a844bee77cd715bb3d816c086b1c9ac5d7a84c5 /include/linux/skbuff.h
parentnet: ipv6: add skb drop reasons to ip6_pkt_drop() (diff)
downloadlinux-2edc1a383fda8d2f580216292dfd9daeae691e47.tar.gz
linux-2edc1a383fda8d2f580216292dfd9daeae691e47.tar.bz2
linux-2edc1a383fda8d2f580216292dfd9daeae691e47.zip
net: ip: add skb drop reasons to ip forwarding
Replace kfree_skb() which is used in ip6_forward() and ip_forward() with kfree_skb_reason(). The new drop reason 'SKB_DROP_REASON_PKT_TOO_BIG' is introduced for the case that the length of the packet exceeds MTU and can't fragment. Signed-off-by: Menglong Dong <imagedong@tencent.com> Reviewed-by: Jiang Biao <benbjiang@tencent.com> Reviewed-by: Hao Peng <flyingpeng@tencent.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 886e83ac4b70..0ef11df1bc67 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -453,6 +453,9 @@ enum skb_drop_reason {
SKB_DROP_REASON_IP_INNOROUTES, /* network unreachable, corresponding
* to IPSTATS_MIB_INADDRERRORS
*/
+ SKB_DROP_REASON_PKT_TOO_BIG, /* packet size is too big (maybe exceed
+ * the MTU)
+ */
SKB_DROP_REASON_MAX,
};