From: Harlan Stenn Date: Mon, 30 May 2011 01:28:17 +0000 (-0400) Subject: [Bug 1936] Correctly set IPV6_MULTICAST_LOOP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41d518d94734e28fa9f646c79eba23e3cbef5af;p=thirdparty%2Fntp.git [Bug 1936] Correctly set IPV6_MULTICAST_LOOP bk: 4de2f2b1DeLCEYeKck-sgUAkGTPMng --- diff --git a/ChangeLog b/ChangeLog index c6dbdd2f6b..de978fb276 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 1936] Correctly set IPV6_MULTICAST_LOOP. (4.2.7p174) 2011/05/28 Released by Harlan Stenn * ntpdc documentation cleanup. * sntp documentation cleanup. diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 1133b761d5..7f93f2c6ef 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -2265,7 +2265,12 @@ enable_multicast_if( ) { #ifdef MCAST +#ifdef IP_MULTICAST_LOOP TYPEOF_IP_MULTICAST_LOOP off = 0; +#endif +#ifdef IPV6_MULTICAST_LOOP + u_int off6 = 0; +#endif NTP_REQUIRE(AF(maddr) == AF(&iface->sin)); @@ -2297,10 +2302,10 @@ enable_multicast_if( */ if (setsockopt(iface->fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, - (char *) &off, sizeof(off))) { + (char *) &off6, sizeof(off6))) { msyslog(LOG_ERR, - "setsockopt IP_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s", + "setsockopt IPV6_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s", iface->fd, stoa(&iface->sin), stoa(maddr)); }