OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: r...@openpkg.org Module: openpkg-src Date: 17-Dec-2009 09:20:16 Branch: HEAD Handle: 2009121708201500 Added files: openpkg-src/ntp ntp.patch Modified files: openpkg-src/ntp ntp.spec Log: apply a FreeBSD IPv6 patch Summary: Revision Changes Path 1.13 +65 -0 openpkg-src/ntp/ntp.patch 1.104 +3 -1 openpkg-src/ntp/ntp.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/ntp/ntp.patch ============================================================================ $ cvs diff -u -r0 -r1.13 ntp.patch --- /dev/null 2009-12-17 09:20:14 +0100 +++ ntp.patch 2009-12-17 09:20:16 +0100 @@ -0,0 +1,65 @@ +Index: ntpd/ntp_io.c +--- ntpd/ntp_io.c.orig 2009-12-09 08:36:37 +0100 ++++ ntpd/ntp_io.c 2009-12-17 09:15:19 +0100 +@@ -64,6 +64,12 @@ + #define SETSOCKOPT_ARG_CAST + #endif + ++#ifdef INCLUDE_IPV6_SUPPORT ++#include <netinet/in.h> ++#include <net/if_var.h> ++#include <netinet/in_var.h> ++#endif /* !INCLUDE_IPV6_SUPPORT */ ++ + extern int listen_to_virtual_ips; + + /* +@@ -1470,6 +1476,36 @@ + } + #endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */ + ++#ifdef INCLUDE_IPV6_SUPPORT ++static isc_boolean_t ++is_anycast(struct sockaddr *sa, char *name) ++{ ++#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST) ++ struct in6_ifreq ifr6; ++ int fd; ++ u_int32_t flags6; ++ ++ if (sa->sa_family != AF_INET6) ++ return ISC_FALSE; ++ if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) ++ return ISC_FALSE; ++ memset(&ifr6, 0, sizeof(ifr6)); ++ memcpy(&ifr6.ifr_addr, (struct sockaddr_in6 *)sa, ++ sizeof(struct sockaddr_in6)); ++ strlcpy(ifr6.ifr_name, name, IF_NAMESIZE); ++ if (ioctl(fd, SIOCGIFAFLAG_IN6, &ifr6) < 0) { ++ close(fd); ++ return ISC_FALSE; ++ } ++ close(fd); ++ flags6 = ifr6.ifr_ifru.ifru_flags6; ++ if ((flags6 & IN6_IFF_ANYCAST) != 0) ++ return ISC_TRUE; ++#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */ ++ return ISC_FALSE; ++} ++#endif /* !INCLUDE_IPV6_SUPPORT */ ++ + /* + * update_interface strategy + * +@@ -1592,6 +1628,11 @@ + if (is_wildcard_addr(&interface.sin)) + continue; + ++#ifdef INCLUDE_IPV6_SUPPORT ++ if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name)) ++ continue; ++#endif /* !INCLUDE_IPV6_SUPPORT */ ++ + /* + * map to local *address* in order to map all duplicate + * interfaces to an interface structure with the @@ . patch -p0 <<'@@ .' Index: openpkg-src/ntp/ntp.spec ============================================================================ $ cvs diff -u -r1.103 -r1.104 ntp.spec --- openpkg-src/ntp/ntp.spec 13 Dec 2009 09:21:07 -0000 1.103 +++ openpkg-src/ntp/ntp.spec 17 Dec 2009 08:20:15 -0000 1.104 @@ -37,7 +37,7 @@ Group: Network License: BSD-style Version: %{V_major}.%{V_minor}.%{V_micro} -Release: 20091213 +Release: 20091217 # package options %option with_fsl yes @@ -51,6 +51,7 @@ Source2: ntp.conf Source3: rc.ntp Source4: fsl.ntp +Patch0: ntp.patch # build information Prefix: %{l_prefix} @@ -91,6 +92,7 @@ %prep %setup -q %setup -q -T -D -a 1 + %patch -p0 %build # configure program @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org