head 1.13; access; symbols OPENPKG_E1_MP_HEAD:1.11 OPENPKG_E1_MP:1.11 OPENPKG_E1_MP_2_STABLE:1.8.2.1 OPENPKG_E1_FP:1.8.2.1 OPENPKG_2_STABLE_MP:1.11 OPENPKG_2_STABLE_20061018:1.8.2.1 OPENPKG_2_STABLE:1.8.0.2 OPENPKG_2_STABLE_BP:1.8 OPENPKG_2_5_RELEASE:1.7 OPENPKG_2_5_SOLID:1.7.0.2 OPENPKG_2_5_SOLID_BP:1.7 OPENPKG_2_4_RELEASE:1.6 OPENPKG_2_4_SOLID:1.6.0.8 OPENPKG_2_4_SOLID_BP:1.6 OPENPKG_CW_FP:1.6 OPENPKG_2_3_RELEASE:1.6 OPENPKG_2_3_SOLID:1.6.0.6 OPENPKG_2_3_SOLID_BP:1.6 OPENPKG_2_2_RELEASE:1.6 OPENPKG_2_2_SOLID:1.6.0.4 OPENPKG_2_2_SOLID_BP:1.6 OPENPKG_2_1_RELEASE:1.6 OPENPKG_2_1_SOLID:1.6.0.2 OPENPKG_2_1_SOLID_BP:1.6 OPENPKG_2_0_RELEASE:1.4 OPENPKG_2_0_SOLID:1.4.0.2 OPENPKG_2_0_SOLID_BP:1.4 OPENPKG_1_3_RELEASE:1.1.4.1 OPENPKG_1_3_SOLID:1.1.4.1.0.2 OPENPKG_1_3_SOLID_BP:1.1.4.1 OPENPKG_1_2_RELEASE:1.1 OPENPKG_1_2_SOLID:1.1.0.6 OPENPKG_1_2_SOLID_BP:1.1 OPENPKG_1_STABLE:1.1.0.4 OPENPKG_1_STABLE_BP:1.1 OPENPKG_1_1_RELEASE:1.1 OPENPKG_1_1_SOLID:1.1.0.2 OPENPKG_1_1_SOLID_BP:1.1; locks; strict; comment @# @; 1.13 date 2009.12.17.08.20.15; author rse; state Exp; branches; next 1.12; commitid lZvD0hBkxZneDHfu; 1.12 date 2009.12.12.12.02.00; author rse; state dead; branches; next 1.11; commitid p1kNOw3Z46rh15fu; 1.11 date 2006.12.29.07.41.59; author cs; state Exp; branches; next 1.10; commitid DfXsw4EDs5fqgo0s; 1.10 date 2006.08.06.09.01.16; author rse; state Exp; branches; next 1.9; commitid zSUV5fcqm9tAmLHr; 1.9 date 2006.08.05.13.37.44; author rse; state Exp; branches; next 1.8; commitid eVnl7TqRL8pqVEHr; 1.8 date 2006.06.07.07.46.25; author rse; state dead; branches 1.8.2.1; next 1.7; commitid oBi8t8Gg3c1tS2Ar; 1.7 date 2005.09.21.09.12.52; author rse; state Exp; branches; next 1.6; 1.6 date 2004.06.03.13.35.15; author ms; state Exp; branches; next 1.5; 1.5 date 2004.06.01.11.12.02; author ms; state Exp; branches; next 1.4; 1.4 date 2004.01.28.22.18.44; author thl; state Exp; branches; next 1.3; 1.3 date 2003.10.19.09.39.15; author rse; state Exp; branches; next 1.2; 1.2 date 2003.07.04.08.45.10; author rse; state dead; branches; next 1.1; 1.1 date 2002.06.30.18.39.28; author rse; state Exp; branches 1.1.4.1; next ; 1.8.2.1 date 2006.10.16.14.53.27; author rse; state Exp; branches; next 1.8.2.2; commitid iZxwRSmmWscPXUQr; 1.8.2.2 date 2007.01.06.13.49.40; author thl; state Exp; branches; next ; commitid 64YWMfcnWvBu2s1s; 1.1.4.1 date 2003.07.24.20.41.58; author rse; state dead; branches; next ; desc @@ 1.13 log @apply a FreeBSD IPv6 patch @ text @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 +#include +#include +#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 @ 1.12 log @upgrading package: ntp 4.2.4p7 -> 4.2.6 @ text @d1 65 a65 12 Index: sntp/Makefile.in --- sntp/Makefile.in.orig 2006-12-29 00:03:38 +0100 +++ sntp/Makefile.in 2006-12-29 08:36:30 +0100 @@@@ -73,7 +73,7 @@@@ sntp_LDADD = $(LDADD) am__DEPENDENCIES_1 = sntp_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +DEFAULT_INCLUDES = -I. -I$(srcdir) -I.. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @ 1.11 log @upgrading package: ntp 4.2.2p4 -> 4.2.4 @ text @@ 1.10 log @upgrading package: ntp 4.2.2p2 -> 4.2.2p3 @ text @d2 3 a4 5 --- sntp/Makefile.in.orig 2006-08-05 21:47:44 +0200 +++ sntp/Makefile.in 2006-08-06 10:52:19 +0200 @@@@ -68,7 +68,7 @@@@ timing.$(OBJEXT) unix.$(OBJEXT) $(am__objects_1) sntp_OBJECTS = $(am_sntp_OBJECTS) d6 2 @ 1.9 log @upgrading package: ntp 4.2.2 -> 4.2.2p2 @ text @d2 3 a4 3 --- sntp/Makefile.in.orig 2006-07-09 13:05:54 +0200 +++ sntp/Makefile.in 2006-08-05 15:35:05 +0200 @@@@ -66,7 +66,7 @@@@ d8 1 a8 1 -DEFAULT_INCLUDES = -I. -I$(srcdir) @ 1.8 log @upgrading package: ntp 4.2.0 -> 4.2.2 @ text @d1 12 a12 143 Index: ntpd/ntp_io.c --- ntpd/ntp_io.c.orig 2003-10-07 23:10:39.000000000 +0200 +++ ntpd/ntp_io.c 2003-10-19 11:37:19.000000000 +0200 @@@@ -809,6 +809,7 @@@@ /* * enable reception of multicast packets */ +#if defined(IPV6_JOIN_GROUP) mreq6.ipv6mr_multiaddr = iaddr6; mreq6.ipv6mr_interface = 0; if(setsockopt(inter_list[i].fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, @@@@ -818,6 +819,7 @@@@ mreq6.ipv6mr_interface, stoa(&addr)); inter_list[i].flags |= INT_MULTICAST; inter_list[i].num_mcast++; +#endif if(i >= ninterfaces) ninterfaces = i+1; @@@@ -963,6 +965,7 @@@@ } else { +#if defined(IPV6_LEAVE_GROUP) /* We are sharing "any address" port :-( Don't close it! */ if (setsockopt(inter_list[i].fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP, (char *)&mreq6, sizeof(mreq6)) == -1) @@@@ -971,6 +974,7 @@@@ /* If there are none left negate the Multicast flag */ if(inter_list[i].num_mcast == 0) inter_list[i].flags &= ~INT_MULTICAST; +#endif } } break; taken from http://cvsweb.freebsd.org/ports/net/ntp/ntp.tar.gz?tarball=1 patch-ntpdc::ntpdc.c --- ntpdc/ntpdc.c.orig Sat Oct 11 00:52:22 2003 +++ ntpdc/ntpdc.c Sun Jan 25 13:29:58 2004 @@@@ -449,7 +449,11 @@@@ hints.ai_flags = AI_NUMERICHOST; a_info = getaddrinfo(hname, service, &hints, &ai); +#ifdef EAI_NODATA if (a_info == EAI_NONAME || a_info == EAI_NODATA) { +#else + if (a_info == EAI_NONAME) { +#endif hints.ai_flags = AI_CANONNAME; #ifdef AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; taken from http://cvsweb.freebsd.org/ports/net/ntp/ntp.tar.gz?tarball=1 patch-ntpq::ntpq.c --- ntpq/ntpq.c.orig Thu Oct 9 02:27:05 2003 +++ ntpq/ntpq.c Sun Jan 25 13:49:33 2004 @@@@ -630,7 +630,11 @@@@ hints.ai_flags = AI_NUMERICHOST; a_info = getaddrinfo(hname, service, &hints, &ai); +#ifdef EAI_NODATA if (a_info == EAI_NONAME || a_info == EAI_NODATA) { +#else + if (a_info == EAI_NONAME) { +#endif hints.ai_flags = AI_CANONNAME; #ifdef AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; Index: configure.in --- configure.in.orig 2004-06-03 15:19:21.000000000 +0200 +++ configure.in 2004-06-03 15:18:18.000000000 +0200 @@@@ -819,7 +819,7 @@@@ *) AC_CHECK_FUNCS(umask) ;; esac -AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf) +AC_CHECK_FUNCS(uname updwtmp updwtmpx vsprintf vsnprintf) case "$host" in *-*-sunos4*) Index: configure --- configure.orig 2004-06-03 15:19:14.000000000 +0200 +++ configure 2004-06-03 15:18:26.000000000 +0200 @@@@ -17746,7 +17746,7 @@@@ -for ac_func in uname updwtmp updwtmpx vsprintf +for ac_func in uname updwtmp updwtmpx vsprintf vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 Index: config.h.in --- config.h.in.orig 2004-06-03 15:18:53.000000000 +0200 +++ config.h.in 2004-06-03 15:18:55.000000000 +0200 @@@@ -822,6 +822,9 @@@@ /* Define to 1 if you have the `vsprintf' function. */ #undef HAVE_VSPRINTF +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + /* Define to 1 if you have the header file. */ #undef HAVE__SYS_SYNC_QUEUE_H Index: include/ntp_stdlib.h --- include/ntp_stdlib.h.orig 2003-07-17 12:27:16 +0200 +++ include/ntp_stdlib.h 2005-09-21 11:03:19 +0200 @@@@ -135,7 +135,9 @@@@ /* clocktypes.c */ struct clktype; +#if 0 extern struct clktype clktypes[]; +#endif /* getopt.c */ extern char * ntp_optarg; /* global argument pointer */ Index: include/ntpd.h --- include/ntpd.h.orig 2003-09-13 05:08:04 +0200 +++ include/ntpd.h 2005-09-21 11:03:32 +0200 @@@@ -227,7 +227,9 @@@@ /* ntp_control.c */ struct ctl_trap; +#if 0 extern struct ctl_trap ctl_trap[]; +#endif extern int num_ctl_traps; extern keyid_t ctl_auth_keyid; /* keyid used for authenticating write requests */ Index: ntpdc/ntpdc_ops.c --- ntpdc/ntpdc_ops.c.orig 2003-10-07 23:10:39 +0200 +++ ntpdc/ntpdc_ops.c 2005-09-21 11:04:43 +0200 @@@@ -25,6 +25,8 @@@@ #include +extern struct clktype clktypes[]; + /* * Declarations for command handlers in here */ @ 1.8.2.1 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @d1 143 a143 12 Index: sntp/Makefile.in --- sntp/Makefile.in.orig 2006-08-05 21:47:44 +0200 +++ sntp/Makefile.in 2006-08-06 10:52:19 +0200 @@@@ -68,7 +68,7 @@@@ timing.$(OBJEXT) unix.$(OBJEXT) $(am__objects_1) sntp_OBJECTS = $(am_sntp_OBJECTS) sntp_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +DEFAULT_INCLUDES = -I. -I$(srcdir) -I.. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @ 1.8.2.2 log @MFC: make up leeway for 2_STABLE by virtue of build-time results @ text @d2 5 a6 3 --- sntp/Makefile.in.orig 2006-12-29 00:03:38 +0100 +++ sntp/Makefile.in 2006-12-29 08:36:30 +0100 @@@@ -73,7 +73,7 @@@@ a7 2 am__DEPENDENCIES_1 = sntp_DEPENDENCIES = $(am__DEPENDENCIES_1) @ 1.7 log @workaround a nasty build problem with GCC 4.0: the includes are partly recursive in their dependencies but gcc 4.0 insists on correct declarations, so disable the declarations in the header and provide them in the source (they occur just once anyway) @ text @@ 1.6 log @ntp usage of vsprintf(3) and vsnprintf(3) is a little messy, but patch at least enough to sucessfully build ntpd using these methods on newer platforms @ text @d106 38 @ 1.5 log @since we are (correctly) testing for the HAVE_VSPRINTF variable in code, configure should at least previously set it or not @ text @d70 9 a78 9 --- configure.in.orig 2004-06-01 13:09:33.037786345 +0200 +++ configure.in 2004-06-01 13:08:41.148480934 +0200 @@@@ -794,7 +794,7 @@@@ esac]) AC_CHECK_FUNCS(setvbuf sigaction) AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl) -AC_CHECK_FUNCS(snprintf strdup strerror strstr) +AC_CHECK_FUNCS(snprintf vsnprintf strdup strerror strstr) AC_CHECK_FUNCS(timegm) d80 1 a80 1 *-*-aix[[45]]*) d82 3 a84 3 --- configure.orig 2004-06-01 13:09:37.013651517 +0200 +++ configure 2004-06-01 13:08:51.875558748 +0200 @@@@ -17385,7 +17385,7 @@@@ d88 2 a89 2 -for ac_func in snprintf strdup strerror strstr +for ac_func in snprintf vsnprintf strdup strerror strstr d93 13 @ 1.4 log @import FreeBSD patches @ text @d69 24 @ 1.3 log @add optional SNTP and Crypto/OpenSSL support; port again to anchient Debian 2.2 @ text @d36 33 @ 1.2 log @the previous 4.1.1b was removed by vendor; the 4.1.1c-rc3 includes already our patch; it's still an RC, but after looking at their ChangeLog we can already use it as it would be 4.1.1c, because they are less active developers on this branch and change mostly nothing. They just take a lot of time... @ text @d1 33 a33 4 --- ntpd/ntp_io.c.orig Thu Jan 3 05:03:15 2002 +++ ntpd/ntp_io.c Sun Jun 30 10:57:50 2002 @@@@ -437,7 +437,8 @@@@ continue; d35 1 a35 7 # endif /* SYS_WINNT */ - ifreq = *ifr; + /* ifreq = *ifr; */ + memmove(&ifreq, ifr, sizeof(ifreq)); inter_list[i].flags = 0; /* is it broadcast capable? */ # ifndef SYS_WINNT @ 1.1 log @fix run-time under 64-bit like NetBSD/sparc64 @ text @@ 1.1.4.1 log @mass Merge-From-CURRENT (MFC) in preparation for OpenPKG 1.3 [class CORE only] @ text @@