ntp 4.2.0: added workaround for IPv6 problem on 2.4.18 machines
authorMarcin Juszkiewicz <hrw@openembedded.org>
Tue, 15 Nov 2005 17:46:57 +0000 (17:46 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Tue, 15 Nov 2005 17:46:57 +0000 (17:46 +0000)
- according to http://bugs.debian.org/249216 problem exist in kernels
  older then 2.4.26 - quote:
  "It's a kernel bug.  Returns an AF_INET6 socket, but IPV6_V6ONLY fails.
   There may be a way to work-around it in ntpdate, but the correct answer
   is to upgrade the kernel."
Behaviour without that changeset:
# ntpdate time.apple.com
ntpdate[25796]: setsockopt() IPV6_V6ONLY failed: Protocol not available
removing ipv6 kernel module helps but it is not a resolution

packages/ntp/files/ipv6only-workaround.patch [new file with mode: 0644]
packages/ntp/ntp_4.2.0.bb

diff --git a/packages/ntp/files/ipv6only-workaround.patch b/packages/ntp/files/ipv6only-workaround.patch
new file mode 100644 (file)
index 0000000..998d2bd
--- /dev/null
@@ -0,0 +1,13 @@
+Patch taken from Debian: http://bugs.debian.org/249216
+------------------------------------------------------------------------
+--- ntp-4.2.0/ntpdate/ntpdate.c~ipv6only-workaround
++++ ntp-4.2.0/ntpdate/ntpdate.c
+@@ -1698,8 +1698,6 @@
+            if (res->ai_family == AF_INET6)
+                 if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) {
+                          netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");
+-                         exit(1);
+-                         /*NOTREACHED*/
+               }
+ #endif
index f59df25..5f4c2a8 100644 (file)
@@ -6,11 +6,12 @@ HOMEPAGE = "http://ntp.isc.org/bin/view/Main/WebHome"
 SECTION = "console/network"
 PRIORITY = "optional"
 LICENSE = "ntp"
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/${P}.tar.gz \
        file://ntpdc.Makefile.am.maybe-layout.patch;patch=1 \
        file://gcc4.patch;patch=1 \
+       file://ipv6only-workaround.patch;patch=1 \
        file://ntpd \
        file://ntp.conf \
        file://ntpdate"