summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-02-16 17:28:41 +0100
committerDavid S. Miller <davem@davemloft.net>2023-02-20 09:54:23 +0100
commitc34b8bb11ebc135e970653bd6fc8e3f863fb6a81 (patch)
treeef1b9c3f83a0573e50cc31d5dcaf7687267ef837 /net/ipv6
parentipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS (diff)
downloadlinux-c34b8bb11ebc135e970653bd6fc8e3f863fb6a81.tar.xz
linux-c34b8bb11ebc135e970653bd6fc8e3f863fb6a81.zip
ipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST
Hosts can often receive neighbour discovery messages that are not for them. Use a dedicated drop reason to make clear the packet is dropped for this normal case. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ndisc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b47e845d66eb..c4be62c99f73 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -921,8 +921,10 @@ have_ifp:
pneigh_enqueue(&nd_tbl, idev->nd_parms, n);
goto out;
}
- } else
+ } else {
+ SKB_DR_SET(reason, IPV6_NDISC_NS_OTHERHOST);
goto out;
+ }
}
if (is_router < 0)