[ntp:bk-ntp-stable-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Wed Oct 13 06:07:30 UTC 2010


#### ChangeSet ####
2010-10-12 14:27:43+00:00, davehart at shiny.ad.hartbrothers.com 
  [Bug 1080] ntpd on ipv6 routers very chatty.

==== ChangeLog ====
2010-10-12 14:27:42+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  [Bug 1080] ntpd on ipv6 routers very chatty.

--- 1.646.1.16/ChangeLog	2010-10-12 01:27:19 -04:00
+++ 1.646.1.17/ChangeLog	2010-10-12 10:27:42 -04:00
@@ -1,6 +1,7 @@
 ---
 
 * [Bug 750] Non-existing device causes coredump with RIPE-NCC driver.
+* [Bug 1080] ntpd on ipv6 routers very chatty.
 * [Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
 * [Bug 1643] Range-check the decoding of the RIPE-NCC status codes.
 * [Bug 1644] cvo.sh should use lsb_release to identify linux distros.

==== configure.ac ====
2010-10-12 14:27:42+00:00, davehart at shiny.ad.hartbrothers.com +33 -11
  [Bug 1080] ntpd on ipv6 routers very chatty.

--- 1.478/configure.ac	2010-10-11 22:34:48 -04:00
+++ 1.479/configure.ac	2010-10-12 10:27:42 -04:00
@@ -462,29 +462,51 @@ case "$host" in
     AC_CHECK_FUNCS(getpassphrase)
 esac
 
-AC_CHECK_HEADERS(arpa/nameser.h)
-AC_CHECK_HEADERS(sys/socket.h)
-AC_CHECK_HEADERS(net/if.h, [], [],
-[#if HAVE_SYS_SOCKET_H
+AC_CHECK_HEADERS([arpa/nameser.h])
+AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([net/if.h], [], [],
+[#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
 ])
-AC_CHECK_HEADERS(net/if6.h)
-AC_CHECK_HEADERS(net/route.h, [], [], [
+AC_CHECK_HEADERS([net/if6.h])
+AC_CHECK_HEADERS([net/route.h], [], [], [
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <net/if.h>
 ])
-AC_CHECK_HEADERS(netinet/in_system.h netinet/in_systm.h)
-AC_CHECK_HEADERS(netinet/in.h)
-AC_CHECK_HEADERS(netinet/ip.h, [], [],
+AC_CHECK_HEADERS([netinet/in_system.h netinet/in_systm.h netinet/in.h])
+AC_CHECK_HEADERS([net/if_var.h], [], [],
 [#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#if HAVE_NETINET_IN_H
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+])
+AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [],
+[#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#if HAVE_NETINET_IN_SYSTM_H
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
 #endif
 ])

==== include/ntp_net.h ====
2010-10-12 14:27:42+00:00, davehart at shiny.ad.hartbrothers.com +9 -0
  [Bug 1080] ntpd on ipv6 routers very chatty.

--- 1.4/include/ntp_net.h	2010-04-14 00:44:51 -04:00
+++ 1.5/include/ntp_net.h	2010-10-12 10:27:42 -04:00
@@ -9,8 +9,17 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
+#ifdef HAVE_NET_IF_VAR_H
+#include <net/if_var.h>
+#endif
+#ifdef HAVE_NETINET_IN_VAR_H
+#include <netinet/in_var.h>
 #endif
 
 #include "ntp_rfc2553.h"

==== ntpd/ntp_io.c ====
2010-10-12 14:27:42+00:00, davehart at shiny.ad.hartbrothers.com +39 -0
  [Bug 1080] ntpd on ipv6 routers very chatty.
  patch originally supplied to freebsd's head/contrib/ntp/ntpd/ntp_io.c
   by ume at freebsd.org
  http://www.mail-archive.com/svn-src-all@freebsd.org/msg16141.html

--- 1.310/ntpd/ntp_io.c	2010-04-14 00:44:51 -04:00
+++ 1.311/ntpd/ntp_io.c	2010-10-12 10:27:42 -04:00
@@ -193,6 +193,9 @@ static int	is_wildcard_netaddr	(const is
  * Multicast functions
  */
 static	isc_boolean_t	addr_ismulticast	(sockaddr_u *);
+static	isc_boolean_t	is_anycast		(sockaddr_u *,
+						 const char *);
+
 /*
  * Not all platforms support multicast
  */
@@ -1470,6 +1473,39 @@ set_wildcard_reuse(
 }
 #endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */
 
+
+static isc_boolean_t
+is_anycast(
+	sockaddr_u *psau,
+	const char *name
+	)
+{
+#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6) && \
+    defined(IN6_IFF_ANYCAST)
+	struct in6_ifreq ifr6;
+	int fd;
+	u_int32_t flags6;
+
+	if (psau->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, &psau->sa6, sizeof(ifr6.ifr_addr));
+	strncpy(ifr6.ifr_name, name, sizeof(ifr6.ifr_name));
+	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	/* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 && IN6_IFF_ANYCAST */
+	return ISC_FALSE;
+}
+
+
 /*
  * update_interface strategy
  *
@@ -1590,6 +1626,9 @@ update_interfaces(
 		 * wild
 		 */
 		if (is_wildcard_addr(&interface.sin))
+			continue;
+
+		if (is_anycast(&interface.sin, isc_if.name))
 			continue;
 
 		/*

#### ChangeSet ####
2010-07-10 18:11:54+00:00, davehart at shiny.ad.hartbrothers.com 
  [Bug 1581] missed one previously

==== ChangeLog ====
2010-07-10 18:11:54+00:00, davehart at shiny.ad.hartbrothers.com +4 -0
  [Bug 1581] missed one previously

--- 1.646/ChangeLog	2010-07-08 22:25:55 -04:00
+++ 1.647/ChangeLog	2010-07-10 14:11:54 -04:00
@@ -1,4 +1,8 @@
 ---
+
+* [Bug 1581] ntp_intres.c size_t printf format string mismatch.
+
+---
 (4.2.6p2) 2010/07/09 Released by Harlan Stenn <stenn at ntp.org>
 
 * [Bug 1581] size_t printf format string mismatches, IRIG string buffers

==== ntpd/ntp_intres.c ====
2010-07-10 18:11:54+00:00, davehart at shiny.ad.hartbrothers.com +1 -1
  [Bug 1581] missed one previously

--- 1.80/ntpd/ntp_intres.c	2010-07-02 02:43:19 -04:00
+++ 1.81/ntpd/ntp_intres.c	2010-07-10 14:11:54 -04:00
@@ -849,7 +849,7 @@ request(
 		n = authencrypt(req_keyid, (void *)&reqpkt, req_len);
 		if ((size_t)n != req_hashlen + sizeof(reqpkt.keyid)) {
 			msyslog(LOG_ERR,
-				"intres maclen %d expected %u\n",
+				"intres maclen %d expected %lu\n",
 				n, (u_long)(req_hashlen +
 				sizeof(reqpkt.keyid)));
 			resolver_exit(1);


More information about the bk-ntp-stable-send mailing list