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
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue