diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2011-05-29 07:40:48 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2011-05-29 07:40:48 +0000 |
commit | 541ab6a6c50a1144fb53dbb570e5867c84b90a65 (patch) | |
tree | 62eb9f9e78135c9af878a46eabf5403b1558202b | |
parent | 92322284cdc3a49687ebcecdc2ae5cc8634dc2ae (diff) |
Notes
-rw-r--r-- | contrib/ntp/ntpd/ntp_io.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index 71ee15fef6f68..8dac3c494b8e2 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -1753,7 +1753,12 @@ void enable_multicast_if(struct interface *iface, struct sockaddr_storage *maddr) { #ifdef MCAST +#ifdef IP_MULTICAST_LOOP /*u_char*/ TYPEOF_IP_MULTICAST_LOOP off = 0; +#endif +#ifdef IPV6_MULTICAST_LOOP + u_int off6 = 0; /* RFC 3493, 5.2. defines type unsigned int */ +#endif switch (maddr->ss_family) { @@ -1797,9 +1802,9 @@ enable_multicast_if(struct interface *iface, struct sockaddr_storage *maddr) * Don't send back to itself, but allow it to fail to set it */ if (setsockopt(iface->fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, - (char *) &off, sizeof(off)) == -1) { + (char *) &off6, sizeof(off6)) == -1) { netsyslog(LOG_ERR, - "setsockopt IP_MULTICAST_LOOP failure: %m on socket %d, addr %s for multicast address %s", + "setsockopt IPV6_MULTICAST_LOOP failure: %m on socket %d, addr %s for multicast address %s", iface->fd, stoa(&iface->sin), stoa(maddr)); } #endif |