From 8ab9c14d45153b48d7e6d8acae68cd38b10006f5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 30 Jun 2020 14:18:54 -0400 Subject: [PATCH] Do not surpress if scope index is distinct This allows vetting multiple peers when vlan tagging is used with LLA. --- confluent_osdeploy/utils/copernicus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/utils/copernicus.c b/confluent_osdeploy/utils/copernicus.c index f0b4d605..807f5dc1 100644 --- a/confluent_osdeploy/utils/copernicus.c +++ b/confluent_osdeploy/utils/copernicus.c @@ -64,6 +64,7 @@ int main(int argc, char* argv[]) { struct sockaddr_in6 *in6; struct sockaddr_in *in, *bin; int ns, n4; + unsigned int lastidx = 2147483648; struct sockaddr_in6 addr, dst; struct sockaddr_in addr4, dst4; char msg[1024]; @@ -229,7 +230,8 @@ int main(int argc, char* argv[]) { } memset(msg, 0, 1024); inet_ntop(dst.sin6_family, &dst.sin6_addr, msg, dstsize); - if (strncmp(last6msg, msg, 1024) != 0) { + if (strncmp(last6msg, msg, 1024) != 0 || lastidx != dst.sin6_scope_id) { + lastidx = dst.sin6_scope_id; sendto(ns, "PING", 4, 0, (const struct sockaddr *)&dst, dstsize); printf("MANAGER: %s", msg); if (strncmp(msg, "fe80::", 6) == 0) {