diff options
author | Arkadiusz MiĆkiewicz | 2008-10-08 15:40:27 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | b437f3129678cd376d9f029699d64e3f11227171 (patch) | |
tree | 80480c390f0f7f206d47a26370aa32b5d4ebe9eb /ntp-ipv6.patch | |
parent | 3e900ae2684c0a8c6c54d7c4eedee279eb4eeee6 (diff) | |
download | ntp-b437f3129678cd376d9f029699d64e3f11227171.zip ntp-b437f3129678cd376d9f029699d64e3f11227171.tar.gz |
- updated
Changed files:
ntp-ipv6.patch -> 1.4
Diffstat (limited to 'ntp-ipv6.patch')
-rw-r--r-- | ntp-ipv6.patch | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/ntp-ipv6.patch b/ntp-ipv6.patch index c4f3346..ac57baf 100644 --- a/ntp-ipv6.patch +++ b/ntp-ipv6.patch @@ -1,21 +1,16 @@ -diff -urN ntp-4.2.0.org/ntpdate/ntpdate.c ntp-4.2.0/ntpdate/ntpdate.c ---- ntp-4.2.0.org/ntpdate/ntpdate.c 2004-05-17 00:41:52.720460048 +0200 -+++ ntp-4.2.0/ntpdate/ntpdate.c 2004-05-17 01:33:48.375808440 +0200 -@@ -1756,12 +1756,14 @@ - } +--- ntp-4.2.4p5/ntpdate/ntpdate.c~ 2008-10-08 17:39:33.485353555 +0200 ++++ ntp-4.2.4p5/ntpdate/ntpdate.c 2008-10-08 17:40:06.661813403 +0200 +@@ -1777,10 +1777,12 @@ #ifdef IPV6_V6ONLY - /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */ -- if (res->ai_family == AF_INET6) -- if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) { -+ if (res->ai_family == AF_INET6) { -+ int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)); -+ if (i < 0 && errno != ENOPROTOOPT) { - netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); - exit(1); - /*NOTREACHED*/ + /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */ + if (res->ai_family == AF_INET6) +- if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) { ++ int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)); ++ if (i < 0 && errno != ENOPROTOOPT) { + netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); + exit(1); + /*NOTREACHED*/ ++ } } -+ } #endif - /* Remember the socket family in fd_family structure */ - |