From: John Hay Date: Tue, 18 Sep 2001 15:55:36 +0000 (+0200) Subject: Make ntp-dev-ipv6 compile again. X-Git-Tag: NTP_4_1_73~265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef5c10730c2e4a8830d6f8472c8a200b233c32ee;p=thirdparty%2Fntp.git Make ntp-dev-ipv6 compile again. bk: 3ba76e78pKeIIBt3qEH8Xc8we4S4rA --- diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 7984e0e523..3e54617d88 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -832,7 +832,7 @@ getconfig( } if (tok == CONFIG_MANYCASTCLIENT) proto_config(PROTO_MULTICAST_ADD, - peeraddr.sin_addr.s_addr, 0.); + 0, 0., &peeraddr); } else if (errflg == -1) { save_resolve(tokens[1], hmode, peerversion, diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index d54c9a84e2..10c3f6e30a 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -1191,7 +1191,7 @@ open_socket( #if defined(IPV6_V6ONLY) if (addr->ss_family == AF_INET6) - if (setsockopt(listenfds[n], IPPROTO_IPV6, IPV6_V6ONLY, + if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&on, sizeof(on))) { msyslog(LOG_ERR, "setsockopt IPV6_V6ONLY on fails: %m"); diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 2e39ae96c6..30a1d0a863 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -496,7 +496,7 @@ receive( * mobilized. */ pkeyid = 0; - if (!SOCKNUL(rbufp->dstadr->bcast)) + if (!SOCKNUL(&rbufp->dstadr->bcast)) dstadr_sin = &rbufp->dstadr->bcast; } else if (peer == NULL) { @@ -586,8 +586,10 @@ receive( if (sys_peer == NULL || PKT_TO_STRATUM(pkt->stratum) < sys_stratum || - rbufp->dstadr->sin.sin_addr.s_addr == - pkt->refid) + /* XXX How do I check IPv6 addresses ? */ + (rbufp->dstadr->sin.ss_family == AF_INET && + ((struct sockaddr_in*)&rbufp->dstadr->sin)->sin_addr.s_addr == + pkt->refid)) return; }