aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMenglong Dong2022-02-26 12:18:31 +0800
committerDavid S. Miller2022-02-26 12:53:59 +0000
commit56d4b4e48ace91ee4e41991438e0e11688750617 (patch)
treea361b481994e7ec96d210132f6c59d25ca70dbcc /net
parenta5736edda10ca2ba075606baad1dda3f2426766d (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/arp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index dc28f0588e54..2d0c05ca9c6f 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -293,7 +293,7 @@ static int arp_constructor(struct neighbour *neigh)
static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
{
dst_link_failure(skb);
- kfree_skb(skb);
+ kfree_skb_reason(skb, SKB_DROP_REASON_NEIGH_FAILED);
}
/* Create and send an arp packet. */