]> git.baikalelectronics.ru Git - kernel.git/commit
net: ip: add skb drop reasons to ip forwarding
authorMenglong Dong <imagedong@tencent.com>
Wed, 13 Apr 2022 08:15:55 +0000 (16:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2022 12:09:57 +0000 (13:09 +0100)
commitdf3944487ec5a17fc886c932542e67da31472736
tree0a844bee77cd715bb3d816c086b1c9ac5d7a84c5
parent7f5b1a21db4f73561eac3150b0a2664bb8de7f85
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>
include/linux/skbuff.h
include/trace/events/skb.h
net/ipv4/ip_forward.c
net/ipv6/ip6_output.c