]>
Commit | Line | Data |
---|---|---|
121d6d6f JK |
1 | diff -durN -x '*.orig' ntp-4.2.6p1.orig/ntpdate/ntpdate.c ntp-4.2.6p1/ntpdate/ntpdate.c |
2 | --- ntp-4.2.6p1.orig/ntpdate/ntpdate.c 2010-05-24 19:28:54.000000000 +0200 | |
3 | +++ ntp-4.2.6p1/ntpdate/ntpdate.c 2010-05-24 19:30:19.000000000 +0200 | |
4 | @@ -1729,11 +1729,13 @@ | |
da9001db | 5 | } |
5a3442bc | 6 | #ifdef IPV6_V6ONLY |
b437f312 | 7 | /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */ |
da9001db | 8 | - if (res->ai_family == AF_INET6) |
b437f312 | 9 | - if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) { |
da9001db | 10 | + if (res->ai_family == AF_INET6) { |
b437f312 | 11 | + int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)); |
121d6d6f JK |
12 | + if ( i < 0 && errno != ENOPROTOOPT ) { |
13 | msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); | |
b437f312 AM |
14 | exit(1); |
15 | /*NOTREACHED*/ | |
16 | + } | |
6754e9cd | 17 | } |
72b7fc97 AM |
18 | #endif |
19 |