]>
Commit | Line | Data |
---|---|---|
5a3442bc AM |
1 | diff -urN ntp-4.2.0.org/ntpdate/ntpdate.c ntp-4.2.0/ntpdate/ntpdate.c |
2 | --- ntp-4.2.0.org/ntpdate/ntpdate.c 2004-05-17 00:41:52.720460048 +0200 | |
72b7fc97 AM |
3 | +++ ntp-4.2.0/ntpdate/ntpdate.c 2004-05-17 01:33:48.375808440 +0200 |
4 | @@ -1697,12 +1697,14 @@ | |
5a3442bc AM |
5 | } |
6 | #ifdef IPV6_V6ONLY | |
7 | /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */ | |
8 | - if (res->ai_family == AF_INET6) | |
9 | - if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) { | |
10 | + if (res->ai_family == AF_INET6) { | |
11 | + int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)); | |
12 | + if (i < 0 && errno != ENOPROTOOPT) { | |
13 | netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); | |
14 | exit(1); | |
15 | /*NOTREACHED*/ | |
72b7fc97 AM |
16 | } |
17 | + } | |
18 | #endif | |
19 | ||
20 | /* Remember the socket family in fd_family structure */ |