From e2b6736e1f5c9a841e37ea1e0c3db4c1989a10ba Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 2 Apr 2021 07:34:39 +0000 Subject: ip6-nd: Solicitation reply only if target is our link-local Type: fix The fib source IP6_ND is used for all link-local entries, hence solicitation responses were sent for a peer's address. Constrain the source check to also in clude the LOCAL flag, which indicates that the link-local address is ours. Signed-off-by: Neale Ranns Change-Id: Iba7e66049e4d89ee3f36d77aeb09310b978d70de --- test/test_ip6.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/test_ip6.py b/test/test_ip6.py index 8abd8d6807f..7635a01c7ce 100644 --- a/test/test_ip6.py +++ b/test/test_ip6.py @@ -504,6 +504,18 @@ class TestIPv6(TestIPv6ND): dst_ip=self.pg0._remote_hosts[3].ip6_ll, tgt_ip=self.pg0.local_ip6_ll) + # + # do not respond to a NS for the peer's address + # + p = (Ether(dst=in6_getnsmac(nsma), src=self.pg0.remote_mac) / + IPv6(dst=d, + src=self.pg0._remote_hosts[3].ip6_ll) / + ICMPv6ND_NS(tgt=self.pg0._remote_hosts[3].ip6_ll) / + ICMPv6NDOptSrcLLAddr( + lladdr=self.pg0.remote_mac)) + + self.send_and_assert_no_replies(self.pg0, p) + # # we should have learned an ND entry for the peer's link-local # but not inserted a route to it in the FIB -- cgit 1.2.3-korg