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

Harlan Stenn stenn at whimsy.udel.edu
Thu Oct 4 06:59:48 UTC 2007


#### ChangeSet ####
2007-09-30 16:40:51+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    ntpd/ntp_timer.c: add missing sys_tai parameter for debug printf
  ntp_timer.c:
    add missing sys_tai parameter for debug printf

==== ChangeLog ====
2007-09-30 16:40:38+00:00, kardel at pogo.udel.edu +1 -0
  ntpd/ntp_timer.c: add missing sys_tai parameter for debug printf

--- 1.119/ChangeLog	2007-09-30 12:09:31 -04:00
+++ 1.120/ChangeLog	2007-09-30 12:40:38 -04:00
@@ -1,3 +1,4 @@
+* ntpd/ntp_timer.c: add missing sys_tai parameter for debug printf
 * [Bug 917] config parse leaves files open
 * [Bug 912] detect conflicting enable/disable configuration on interfaces sharing an IP address
 * [Bug 771] compare scopeid if available for IPv6 addresses

==== ntpd/ntp_timer.c ====
2007-09-30 16:38:57+00:00, kardel at pogo.udel.edu +1 -1
  add missing sys_tai parameter for debug printf

--- 1.40/ntpd/ntp_timer.c	2007-08-17 01:37:15 -04:00
+++ 1.41/ntpd/ntp_timer.c	2007-09-30 12:38:57 -04:00
@@ -333,7 +333,7 @@ timer(void)
 			get_systime(&now);
 			msyslog(LOG_NOTICE,
 			    "timer: leap second at %u TAI %d s",
-			    now.l_ui);
+				now.l_ui, sys_tai);
 		}
 	}
 

#### ChangeSet ####
2007-09-30 16:09:50+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    [Bug 917] config parse leaves files open
  ntp_scanner.c:
    Bug 917: config parse leaves files open

==== ChangeLog ====
2007-09-30 16:09:31+00:00, kardel at pogo.udel.edu +1 -0
  [Bug 917] config parse leaves files open

--- 1.118/ChangeLog	2007-09-30 12:04:44 -04:00
+++ 1.119/ChangeLog	2007-09-30 12:09:31 -04:00
@@ -1,3 +1,4 @@
+* [Bug 917] config parse leaves files open
 * [Bug 912] detect conflicting enable/disable configuration on interfaces sharing an IP address
 * [Bug 771] compare scopeid if available for IPv6 addresses
 * [Bug 899] Only show -i/--jaildir -u/--user options if we HAVE_DROPROOT.

==== ntpd/ntp_scanner.c ====
2007-09-30 16:06:19+00:00, kardel at pogo.udel.edu +3 -2
  Bug 917: config parse leaves files open

--- 1.8/ntpd/ntp_scanner.c	2007-06-12 18:01:18 -04:00
+++ 1.9/ntpd/ntp_scanner.c	2007-09-30 12:06:19 -04:00
@@ -525,8 +525,9 @@ int yylex()
             if (!(curr_include_level > 0)) 
             	return 0;
 			else { 
-                ip_file = fp[--curr_include_level]; 
-                return T_EOC;
+				FCLOSE(fp[curr_include_level]);
+				ip_file = fp[--curr_include_level]; 
+				return T_EOC;
 			}
 		} else if (is_EOC(ch)) {
             expect_string = NO_ARG;   /* Reset expect_string */

#### ChangeSet ####
2007-09-30 16:05:00+00:00, kardel at pogo.udel.edu 
  ntp_io.c:
    Bug 912: detect conflicting enable/disable configuration on interfaces sharing an IP address
  ChangeLog:
    [Bug 912] detect conflicting enable/disable configuration on interfaces sharing an IP address

==== ChangeLog ====
2007-09-30 16:04:44+00:00, kardel at pogo.udel.edu +1 -0
  [Bug 912] detect conflicting enable/disable configuration on interfaces sharing an IP address

--- 1.117/ChangeLog	2007-09-30 11:57:26 -04:00
+++ 1.118/ChangeLog	2007-09-30 12:04:44 -04:00
@@ -1,3 +1,4 @@
+* [Bug 912] detect conflicting enable/disable configuration on interfaces sharing an IP address
 * [Bug 771] compare scopeid if available for IPv6 addresses
 * [Bug 899] Only show -i/--jaildir -u/--user options if we HAVE_DROPROOT.
 * [Bug 916] 'cryptosw' is undefined if built without OpenSSL.

==== ntpd/ntp_io.c ====
2007-09-30 15:59:48+00:00, kardel at pogo.udel.edu +39 -2
  Bug 912: detect conflicting enable/disable configuration on interfaces sharing an IP address

--- 1.261/ntpd/ntp_io.c	2007-08-15 03:04:53 -04:00
+++ 1.262/ntpd/ntp_io.c	2007-09-30 11:59:48 -04:00
@@ -603,7 +603,7 @@ print_interface(struct interface *iface,
 	       iface->flags,
 	       iface->scopeid,
 	       iface->ifindex);
-	/* Leave these as three printf calls. */
+	/* Leave these as three printf calls (stoa() static buffer). */
 	printf(", sin=%s",
 	       stoa((&iface->sin)));
 	if (iface->flags & INT_BROADCAST)
@@ -1275,9 +1275,46 @@ update_interfaces(
 			/*
 			 * found existing and up to date interface - mark present
 			 */
+			if (iface->phase != sys_interphase)
+			{
+				/*
+				 * on a new round we reset the name so the interface name
+				 * shows up again if this address is not shared any more
+				 * same reasoning goes for the enable flag
+				 */
+				strcpy(iface->name, interface.name);
+				iface->ignore_packets = interface.ignore_packets;
+			} else {
+				/*
+				 * name collision - rename interface name to "*multiple*"
+				 */
+				strcpy(iface->name, "*multiple*");
+			}
 
-			iface->phase = sys_interphase;
 			DPRINT_INTERFACE(4, (iface, "updating ", " present\n"));
+
+			if (iface->ignore_packets != interface.ignore_packets)
+			{
+				/*
+				 * We have conflicting configurations for the interface address.
+				 * This is caused by using -I <interfacename> for an interface
+				 * that shares it address with other interfaces. We cannot disambiguate
+				 * incoming pakets being delivered to this socket without extra
+				 * syscalls/features. These are not (commonly) available.
+				 * Note is is a more unusual configuration where several interfaces
+				 * share an address but filtering via interface name is attempted.
+				 * We resolve the configuration conflict by disabling the reception
+				 * of pakets. This leads to a basically non-functional service on the
+				 * interface address where the conflict occurs.
+				 */
+				msyslog(LOG_ERR, "WARNING: conflicting enable configuration for interfaces %s and %s for address %s - unsupported configuration - address DISABLED",
+					interface.name, iface->name, stoa(&interface.sin));
+
+				iface->ignore_packets = ISC_TRUE;				
+			}
+
+			iface->phase = sys_interphase;
+
 			ifi.action = IFS_EXISTS;
 			ifi.interface = iface;
 			if (receiver)

#### ChangeSet ####
2007-09-30 15:57:52+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    [Bug 771] compare scopeid if available for IPv6 addresses
  ntp.h:
    Bug 771: compare scopeid if available for IPv6 addresses

==== ChangeLog ====
2007-09-30 15:57:26+00:00, kardel at pogo.udel.edu +1 -0
  [Bug 771] compare scopeid if available for IPv6 addresses

--- 1.116/ChangeLog	2007-09-23 03:14:57 -04:00
+++ 1.117/ChangeLog	2007-09-30 11:57:26 -04:00
@@ -1,3 +1,4 @@
+* [Bug 771] compare scopeid if available for IPv6 addresses
 * [Bug 899] Only show -i/--jaildir -u/--user options if we HAVE_DROPROOT.
 * [Bug 916] 'cryptosw' is undefined if built without OpenSSL.
 * [Bug 891] 'restrict' config file keyword does not work (partial fix).

==== include/ntp.h ====
2007-09-30 15:54:35+00:00, kardel at pogo.udel.edu +7 -1
  Bug 771: compare scopeid if available for IPv6 addresses

--- 1.137/include/ntp.h	2007-09-09 07:07:54 -04:00
+++ 1.138/include/ntp.h	2007-09-30 11:54:35 -04:00
@@ -515,6 +515,12 @@ struct peer {
  /*
  * Macro for sockaddr_storage structures operations
  */
+#ifdef ISC_PLATFORM_HAVESCOPEID
+#define SOCKSCOPE(sock1, sock2) (((struct sockaddr_in6 *)sock1)->sin6_scope_id == ((struct sockaddr_in6 *)sock2)->sin6_scope_id)
+#else
+#define SOCKSCOPE(sock1, sock2) 1
+#endif
+
 #define SOCKCMP(sock1, sock2) \
 	(((struct sockaddr_storage *)sock1)->ss_family \
 	    == ((struct sockaddr_storage *)sock2)->ss_family ? \
@@ -524,7 +530,7 @@ struct peer {
 	    sizeof(struct in_addr)) == 0 : \
 	memcmp(&((struct sockaddr_in6 *)sock1)->sin6_addr, \
 	    &((struct sockaddr_in6 *)sock2)->sin6_addr, \
-	    sizeof(struct in6_addr)) == 0 : \
+	       sizeof(struct in6_addr)) == 0 && SOCKSCOPE(sock1, sock2) : \
 	0)
 
 #define SOCKNUL(sock1) \


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