]> git.baikalelectronics.ru Git - kernel.git/commit
net: neigh: add skb drop reasons to arp_error_report()
authorMenglong Dong <imagedong@tencent.com>
Sat, 26 Feb 2022 04:18:31 +0000 (12:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Feb 2022 12:53:59 +0000 (12:53 +0000)
commit249301ae3e617e5dfc6716de2ad4a6c0141430cc
treea361b481994e7ec96d210132f6c59d25ca70dbcc
parent7a867d06b843e9887fa10bf6208f5bed616f2ed9
net: neigh: add skb drop reasons to arp_error_report()

When neighbour become invalid or destroyed, neigh_invalidate() will be
called. neigh->ops->error_report() will be called if the neighbour's
state is NUD_FAILED, and seems here is the only use of error_report().
So we can tell that the reason of skb drops in arp_error_report() is
SKB_DROP_REASON_NEIGH_FAILED.

Replace kfree_skb() used in arp_error_report() with kfree_skb_reason().

Reviewed-by: Mengen Sun <mengensun@tencent.com>
Reviewed-by: Hao Peng <flyingpeng@tencent.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/arp.c