From: Frank Kardel Date: Sun, 15 Oct 2006 06:03:07 +0000 (+0000) Subject: ntp_io.c: X-Git-Tag: NTP_4_2_3P59~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3313134dfcd301f79fa19c2fe4bc602cdf44a83;p=thirdparty%2Fntp.git ntp_io.c: Bug 715: Fix from Peter Pramberger do not send link scoped multicasts with a glocbal source address (if present on that interface) bk: 4531cf1bH7s21OIZZnPwIzHivbuojg --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index c204020d8..f94b380ca 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -3367,11 +3367,18 @@ findbcastinter( #endif /* * If we are looking to match a multicast address grab it. - * We must not do this before we have eliminated any linklocal - * addresses */ if (addr_ismulticast(addr) == ISC_TRUE && interface->flags & INT_MULTICAST) { +#ifdef INCLUDE_IPV6_SUPPORT + if(addr->ss_family == AF_INET6) { + /* Only use link-local address for link-scope mcast */ + if(IN6_IS_ADDR_MC_LINKLOCAL(&((struct sockaddr_in6*)addr)->sin6_addr) && + !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6*)&interface->sin)->sin6_addr)) { + continue; + } + } +#endif break; }