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

Harlan Stenn stenn at whimsy.udel.edu
Sun Jul 3 18:53:23 UTC 2005


This BitKeeper patch contains the following changesets:
mayer at pogo.udel.edu|ChangeSet|20050703123038|41346

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# ID:	stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
# User:	stenn
# Host:	whimsy.udel.edu
# Root:	/backroom/ntp-dev

#
#--- 1.127/ntpd/ntp_config.c	2005-06-25 22:13:57 -04:00
#+++ 1.128/ntpd/ntp_config.c	2005-07-02 15:27:13 -04:00
#@@ -242,7 +242,6 @@
# 	{ "cohort",		CONF_TOS_COHORT },
# 	{ "mindist",		CONF_TOS_MINDIST },
# 	{ "maxdist",		CONF_TOS_MAXDIST },
#-	{ "maxhop",		CONF_TOS_MAXHOP },
# 	{ "",			CONFIG_UNKNOWN }
# };
# 
#@@ -343,7 +342,7 @@
#  * Definitions of things either imported from or exported to outside
#  */
# 
#-int default_ai_family = AF_UNSPEC;	/* Default either IPv4 or IPv6 */
#+short default_ai_family = AF_UNSPEC;	/* Default either IPv4 or IPv6 */
# char const *progname;
# char	*sys_phone[MAXPHONE] = {NULL}; /* ACTS phone numbers */
# char	*keysdir = NTP_KEYSDIR;	/* crypto keys directory */
#@@ -393,7 +392,7 @@
# enum gnn_type {
# 	t_UNK,		/* Unknown */
# 	t_REF,		/* Refclock */
#-	t_MSK		/* Network Mask */
#+	t_MSK,		/* Network Mask */
# 	};
# static	int getnetnum P((const char *, struct sockaddr_storage *, int,
# 			 enum gnn_type));
#@@ -737,6 +736,7 @@
# 					    break;
# 				    }
# 				    peerkey = (int)atol(tokens[++i]);
#+				    peerflags |= FLAG_AUTHENABLE;
# 				    break;
# 
# 				case CONF_MOD_MINPOLL:
#@@ -1092,10 +1092,6 @@
# 
# 			    case CONF_TOS_MAXDIST:
# 				proto_config(PROTO_MAXDIST, 0, ftemp, NULL);
#-				break;
#-
#-			    case CONF_TOS_MAXHOP:
#-				proto_config(PROTO_MAXHOP, 0, ftemp, NULL);
# 				break;
# 			    }
# 			}
#
#--- 1.180/ntpd/ntp_io.c	2005-06-25 22:12:38 -04:00
#+++ 1.181/ntpd/ntp_io.c	2005-07-02 15:25:25 -04:00
#@@ -372,6 +372,7 @@
# #endif
# 
# 	if(okipv4 == ISC_TRUE) {
#+		inter_list[idx].family = AF_INET;
# 		inter_list[idx].sin.ss_family = AF_INET;
# 		((struct sockaddr_in*)&inter_list[idx].sin)->sin_addr.s_addr = htonl(INADDR_ANY);
# 		((struct sockaddr_in*)&inter_list[idx].sin)->sin_port = port;
#@@ -407,6 +408,7 @@
# 	 * create pseudo-interface with wildcard IPv6 address
# 	 */
# 	if (isc_net_probeipv6() == ISC_R_SUCCESS) {
#+		inter_list[idx].family = AF_INET6;
# 		inter_list[idx].sin.ss_family = AF_INET6;
# 		((struct sockaddr_in6*)&inter_list[idx].sin)->sin6_addr = in6addr_any;
# 		((struct sockaddr_in6*)&inter_list[idx].sin)->sin6_port = port;
#@@ -474,7 +476,7 @@
# void
# convert_isc_if(isc_interface_t *isc_if, struct interface *itf, u_short port) {
# 
#-	itf->family = isc_if->af;
#+	itf->family = (short) isc_if->af;
# 	if(isc_if->af == AF_INET) {
# 		itf->sin.ss_family = (u_short) isc_if->af;
# 		strcpy(itf->name, isc_if->name);
#@@ -1120,10 +1122,9 @@
# 	)
# {
# #ifdef MCAST
#-	int i = ninterfaces;	/* Use the next interface */
#+	int i;
# 	isc_boolean_t jstatus;
# 	int ind;
#-	int lif = 0;
# 	int lscope = 0;
# 
# 	/*
#@@ -1194,12 +1195,15 @@
# #endif
# 		memset(&((struct sockaddr_in6*)&inter_list[ind].mask)->sin6_addr.s6_addr, 0xff, sizeof(struct in6_addr));
# #endif
#-		lif = findlocalcastinterface(&addr, INT_MULTICAST);
#-		lscope = ((struct sockaddr_in6*)&inter_list[lif].sin)->sin6_scope_id;
#+		i = findlocalcastinterface(&addr, INT_MULTICAST);
#+		if (i < 0)
#+			lscope = 0;
#+		else
#+			lscope = ((struct sockaddr_in6*)&inter_list[i].sin)->sin6_scope_id;
# #ifdef DEBUG
# 	if (debug > 1)
# 		printf("Found interface index %d, scope: %d for address %s\n",
#-			lif, lscope, stoa(&addr));
#+			i, lscope, stoa(&addr));
# #endif
# 		break;
# 	}
#@@ -1216,7 +1220,10 @@
# 						htonl(~(u_int32)0);
# 		if (ind >= ninterfaces)
# 			ninterfaces = ind + 1;
#-		print_interface(ind);
#+#ifdef DEBUG
#+		if(debug > 1)
#+			print_interface(ind);
#+#endif
# 	}
# 	else
# 	{
#@@ -1242,7 +1249,7 @@
# 	}
# 
# #else
#-	ind = findlocalinterface(&addr);
#+	ind = findlocalcastinterface(&addr, INT_MULTICAST);
# #endif
# 	/*
# 	 * If we don't have a valid socket, just return
#@@ -2405,8 +2412,8 @@
# 	int i;
# 	int nif = -1;
# 
#-	isc_boolean_t want_linklocal = ISC_FALSE; 
# #if defined(ISC_PLATFORM_HAVEIPV6) && defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
#+	isc_boolean_t want_linklocal = ISC_FALSE; 
# 	if (addr_ismulticast(addr) && flags == INT_MULTICAST)
# 	{
# 		if (IN6_IS_ADDR_MC_LINKLOCAL(&((struct sockaddr_in6*)addr)->sin6_addr))
#@@ -2474,13 +2481,28 @@
# 	)
# {
# #if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
#-	register int i;
#+	int i;
#+	int flag;
# 	
# #ifdef DEBUG
# 	if (debug>2)
# 	    printf("Finding broadcast interface for addr %s in list of addresses\n",
# 		   stoa(addr));
# #endif
#+	if (addr_ismulticast(addr))
#+		flag = INT_MULTICAST;
#+	else
#+		flag = INT_BROADCAST;
#+	i = findlocalcastinterface(addr, flag);
#+
#+	if (i >= 0) {
#+#ifdef DEBUG
#+		if (debug > 1)
#+			printf("Found bcastinter index %d\n", i);
#+#endif
#+		return (&inter_list[i]);
#+	}
#+	/* Didn't find it, so try something else */
# 
# 	i = find_flagged_addr_in_list(addr, INT_BCASTOPEN|INT_MCASTOPEN);
# #ifdef DEBUG
#

# Diff checksum=4ccd51bc


# Patch vers:	1.3
# Patch type:	REGULAR

== ChangeSet ==
stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
stenn at whimsy.udel.edu|ChangeSet|20050703055751|41353
D 1.1387 05/07/03 08:30:38-04:00 mayer at pogo.udel.edu +2 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Additional IPv6 multicasting fixes and fix for size of default_ai_family
K 41346
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|ntpd/ntp_config.c|19990526004817|01635|3aed0663 mayer at pogo.udel.edu|ntpd/ntp_config.c|20050702192713|33173
> stenn at whimsy.udel.edu|ntpd/ntp_io.c|19990526004817|01635|3aed0663 mayer at pogo.udel.edu|ntpd/ntp_io.c|20050702192525|53193

== ntpd/ntp_config.c ==
stenn at whimsy.udel.edu|ntpd/ntp_config.c|19990526004817|01635|3aed0663
mayer at pogo.udel.edu|ntpd/ntp_config.c|20050626021357|38764
D 1.128 05/07/02 15:27:13-04:00 mayer at pogo.udel.edu +3 -7
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Fix the size of default_ai_family which should have been short
K 33173
O -rw-rw-r--
P ntpd/ntp_config.c
------------------------------------------------

D245 1
D346 1
I346 1
short default_ai_family = AF_UNSPEC;	/* Default either IPv4 or IPv6 */
D396 1
I396 1
	t_MSK,		/* Network Mask */
I739 1
				    peerflags |= FLAG_AUTHENABLE;
D1095 4

== ntpd/ntp_io.c ==
stenn at whimsy.udel.edu|ntpd/ntp_io.c|19990526004817|01635|3aed0663
mayer at pogo.udel.edu|ntpd/ntp_io.c|20050626021238|22673
D 1.181 05/07/02 15:25:25-04:00 mayer at pogo.udel.edu +32 -10
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Additional fixes for IPv6 multicasting
K 53193
O -rw-rw-r--
P ntpd/ntp_io.c
------------------------------------------------

I374 1
		inter_list[idx].family = AF_INET;
I409 1
		inter_list[idx].family = AF_INET6;
D477 1
I477 1
	itf->family = (short) isc_if->af;
D1123 1
I1123 1
	int i;
D1126 1
D1197 2
I1198 5
		i = findlocalcastinterface(&addr, INT_MULTICAST);
		if (i < 0)
			lscope = 0;
		else
			lscope = ((struct sockaddr_in6*)&inter_list[i].sin)->sin6_scope_id;
D1202 1
I1202 1
			i, lscope, stoa(&addr));
D1219 1
I1219 4
#ifdef DEBUG
		if(debug > 1)
			print_interface(ind);
#endif
D1245 1
I1245 1
	ind = findlocalcastinterface(&addr, INT_MULTICAST);
D2408 1
I2409 1
	isc_boolean_t want_linklocal = ISC_FALSE; 
D2477 1
I2477 2
	int i;
	int flag;
I2483 14
	if (addr_ismulticast(addr))
		flag = INT_MULTICAST;
	else
		flag = INT_BROADCAST;
	i = findlocalcastinterface(addr, flag);
\
	if (i >= 0) {
#ifdef DEBUG
		if (debug > 1)
			printf("Found bcastinter index %d\n", i);
#endif
		return (&inter_list[i]);
	}
	/* Didn't find it, so try something else */

# Patch checksum=171a0c9f


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