aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-21 12:13:44 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-21 12:16:16 +0200
commitaf55c4e98fd164669bb3d1149fb097c365085353 (patch)
tree987b2e86bf8401871f06aaae3a4f6f8571d14b76
parentbf68270898a0ea72213adec0c4455ae88ce1a73f (diff)
downloadpasst-af55c4e98fd164669bb3d1149fb097c365085353.tar
passt-af55c4e98fd164669bb3d1149fb097c365085353.tar.gz
passt-af55c4e98fd164669bb3d1149fb097c365085353.tar.bz2
passt-af55c4e98fd164669bb3d1149fb097c365085353.tar.lz
passt-af55c4e98fd164669bb3d1149fb097c365085353.tar.xz
passt-af55c4e98fd164669bb3d1149fb097c365085353.tar.zst
passt-af55c4e98fd164669bb3d1149fb097c365085353.zip
ndp: Don't sabotage DAD by replying to probing neighbour solicitation
If the solicitation comes from ::, it's the guest performing duplicate address detection -- don't answer that. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--ndp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ndp.c b/ndp.c
index 3487e51..92abbe9 100644
--- a/ndp.c
+++ b/ndp.c
@@ -76,6 +76,9 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
sizeof(struct in6_addr))
return -1;
+ if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->saddr))
+ return 1;
+
info("NDP: received NS, sending NA");
ihr->icmp6_type = NA;
ihr->icmp6_code = 0;