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>
This commit is contained in:
parent
3ae42cc809
commit
2edc1a383f
4 changed files with 20 additions and 6 deletions
|
|
@ -65,6 +65,7 @@
|
|||
EM(SKB_DROP_REASON_INVALID_PROTO, INVALID_PROTO) \
|
||||
EM(SKB_DROP_REASON_IP_INADDRERRORS, IP_INADDRERRORS) \
|
||||
EM(SKB_DROP_REASON_IP_INNOROUTES, IP_INNOROUTES) \
|
||||
EM(SKB_DROP_REASON_PKT_TOO_BIG, PKT_TOO_BIG) \
|
||||
EMe(SKB_DROP_REASON_MAX, MAX)
|
||||
|
||||
#undef EM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue