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

Harlan Stenn stenn at whimsy.udel.edu
Sat Aug 18 09:05:36 UTC 2007


#### ChangeSet ####
2007-08-18 04:07:51-04:00, stenn at pogo.udel.edu 
  merge cleanup

==== ChangeLog ====
2007-08-18 04:07:41-04:00, stenn at pogo.udel.edu +13 -0
  merge cleanup

--- 1.96/ChangeLog	2007-08-15 03:04:53 -04:00
+++ 1.97/ChangeLog	2007-08-18 04:07:41 -04:00
@@ -91,6 +91,19 @@
 * codec (audio) and ICOM changes from Dave Mills.
 
 ---
+
+* ntpd/refclock_parse.c: cleanup shutdown while the file descriptor is still
+  open.
+* [Bug 885] use emalloc() to get a message at the end of the memory
+  unsigned types cannot be less than 0
+  default_ai_family is a short
+  lose trailing , from enum list
+* [Bug 884] don't access recv buffers after having them passed to the free
+  list.
+* [Bug 882] allow loopback interfaces to share addresses with other
+  interfaces.
+
+---
 (4.2.4p3) Released by Harlan Stenn <stenn at ntp.org>
 
 * [Bug 863] unable to stop ntpd on Windows as the handle reference for events

#### ChangeSet ####
2007-08-17 05:28:07-04:00, stenn at pogo.udel.edu 
  Use autoconf-2.59 and automake-1.9 for building 4.2.4

==== bootstrap ====
2007-08-17 05:27:51-04:00, stenn at pogo.udel.edu +18 -2
  Use autoconf-2.59 and automake-1.9 for building 4.2.4

--- 1.18/bootstrap	2006-11-21 02:43:17 -05:00
+++ 1.18.1.1/bootstrap	2007-08-17 05:27:51 -04:00
@@ -27,9 +27,25 @@
 
 set -e
 
+scripts/genver
+
+# autoreconf says:
+# The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
+# AUTOPOINT, LIBTOOLIZE, M4 are honored.
+
 AUTORECONF=${AUTORECONF:-autoreconf}
 
-scripts/genver
+case `hostname` in
+ pogo.udel.edu)
+    if fgrep -q 4.2.4 version.m4; then
+	AUTOCONF=autoconf-2.59
+	AUTOHEADER=autoheader-2.59
+	AUTOMAKE=automake-1.9
+	ACLOCAL=aclocal-1.9
+	export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
+    fi
+    ;;
+esac
 
 # 20060629: HMS: Let's try checking in libopts and the autogen-generated files
 ## The copy for ntp...
@@ -101,4 +117,4 @@ ${AUTORECONF} -i -v
 ## we get the correct srcdir path in sntp/libopts/Makefile.in
 #rm -rf sntp/autom4te.cache
 #
-#(cd sntp && ${AUTORECONF} -f -i -v)
+#(cd sntp && ${AUTORECONF} -i -v)

#### ChangeSet ####
2007-08-11 17:32:22+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    document refclock_parse.c fix

==== ChangeLog ====
2007-08-11 17:31:30+00:00, kardel at pogo.udel.edu +1 -0
  document refclock_parse.c fix

--- 1.1.1.25/ChangeLog	2007-08-11 13:30:24 -04:00
+++ 1.1.1.26/ChangeLog	2007-08-11 13:31:30 -04:00
@@ -1,3 +1,4 @@
+* ntpd/refclock_parse.c: cleanup shutdown while the file descriptor is still open.
 * [Bug 885] use emalloc() to get a message at the end of the memory
             unsigned types cannot be less than 0
             default_ai_family is a short

#### ChangeSet ####
2007-08-11 17:30:42+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    document Bug 885
  ntp_io.c:
    Bug 885: use emalloc() to get a message at the end of the memory
  cmd_args.c:
    Bug 885: unsigned types cannot be less than 0
    	 default_ai_family is a short
  ntp_config.c:
    Bug 885: lose trailing , from enum list

==== ChangeLog ====
2007-08-11 17:30:24+00:00, kardel at pogo.udel.edu +4 -0
  document Bug 885

--- 1.1.1.24/ChangeLog	2007-08-09 16:30:26 -04:00
+++ 1.1.1.25/ChangeLog	2007-08-11 13:30:24 -04:00
@@ -1,3 +1,7 @@
+* [Bug 885] use emalloc() to get a message at the end of the memory
+            unsigned types cannot be less than 0
+            default_ai_family is a short
+            lose trailing , from enum list
 * [Bug 884] don't access recv buffers after having them passed to the free list.
 * [Bug 882] allow loopback interfaces to share addresses with other interfaces.
 

==== ntpd/cmd_args.c ====
2007-08-11 17:19:51+00:00, kardel at pogo.udel.edu +2 -2
  Bug 885: unsigned types cannot be less than 0
  	 default_ai_family is a short

--- 1.45/ntpd/cmd_args.c	2006-09-23 13:23:01 -04:00
+++ 1.45.3.1/ntpd/cmd_args.c	2007-08-11 13:19:51 -04:00
@@ -23,7 +23,7 @@
  */
 extern char const *progname;
 extern const char *specific_interface;
-extern int default_ai_family;
+extern short default_ai_family;
 
 #ifdef HAVE_NETINFO
 extern int	check_netinfo;
@@ -126,7 +126,7 @@ getCmdOpts(
 			const char* p = *pp++;
 
 			tkey = (int)atol(p);
-			if (tkey <= 0 || tkey > NTP_MAXKEY) {
+			if (tkey = 0 || tkey > NTP_MAXKEY) {
 				msyslog(LOG_ERR,
 				    "command line trusted key %s is invalid",
 				    p);

==== ntpd/ntp_config.c ====
2007-08-11 17:20:52+00:00, kardel at pogo.udel.edu +1 -1
  Bug 885: lose trailing , from enum list

--- 1.141/ntpd/ntp_config.c	2006-08-27 19:44:07 -04:00
+++ 1.141.1.1/ntpd/ntp_config.c	2007-08-11 13:20:52 -04:00
@@ -406,7 +406,7 @@ static	int matchkey P((char *, struct ke
 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));

==== ntpd/ntp_io.c ====
2007-08-11 17:21:17+00:00, kardel at pogo.udel.edu +1 -1
  Bug 885: use emalloc() to get a message at the end of the memory

--- 1.244.2.8/ntpd/ntp_io.c	2007-08-09 15:01:30 -04:00
+++ 1.244.2.9/ntpd/ntp_io.c	2007-08-11 13:21:17 -04:00
@@ -3591,7 +3591,7 @@ kill_asyncio(int startfd)
  */
 static void
 add_fd_to_list(SOCKET fd, enum desc_type type) {
-	vsock_t *lsock = (vsock_t *)malloc(sizeof(vsock_t));
+	vsock_t *lsock = (vsock_t *)emalloc(sizeof(vsock_t));
 	lsock->fd = fd;
 	lsock->type = type;
 

#### ChangeSet ####
2007-08-11 17:19:45+00:00, kardel at pogo.udel.edu 
  refclock_parse.c:
    remove io binding before io_closeclock() closes the file descriptor

==== ntpd/refclock_parse.c ====
2007-08-11 17:17:16+00:00, kardel at pogo.udel.edu +25 -10
  remove io binding before io_closeclock() closes the file descriptor

--- 1.47/ntpd/refclock_parse.c	2006-12-22 15:34:30 -05:00
+++ 1.47.1.1/ntpd/refclock_parse.c	2007-08-11 13:17:16 -04:00
@@ -1,15 +1,21 @@
 /*
- * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.78 2006/12/22 20:08:27 kardel RELEASE_20061222_A
+ * /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.80 2007/08/11 12:06:29 kardel Exp
  *
- * refclock_parse.c,v 4.78 2006/12/22 20:08:27 kardel RELEASE_20061222_A
+ * refclock_parse.c,v 4.80 2007/08/11 12:06:29 kardel Exp
  *
  * generic reference clock driver for several DCF/GPS/MSF/... receivers
  *
- * optionally make use of a STREAMS module for input processing where
- * available and configured. Currently the STREAMS module
- * is only available for Suns running SunOS 4.x and SunOS5.x
+ * PPS notes:
+ *   On systems that support PPSAPI (RFC2783) PPSAPI is the
+ *   preferred interface.
  *
- * Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org>
+ *   Optionally make use of a STREAMS module for input processing where
+ *   available and configured. This STREAMS module reduces the time
+ *   stamp latency for serial and PPS events.
+ *   Currently the STREAMS module is only available for Suns running
+ *   SunOS 4.x and SunOS5.x.
+ *
+ * Copyright (c) 1995-2007 by Frank Kardel <kardel <AT> ntp.org>
  * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
  *
  * Redistribution and use in source and binary forms, with or without
@@ -182,7 +188,7 @@
 #include "ieee754io.h"
 #include "recvbuff.h"
 
-static char rcsid[] = "refclock_parse.c,v 4.78 2006/12/22 20:08:27 kardel RELEASE_20061222_A";
+static char rcsid[] = "refclock_parse.c,v 4.80 2007/08/11 12:06:29 kardel Exp";
 
 /**===========================================================================
  ** external interface to ntp mechanism
@@ -2633,13 +2639,16 @@ parse_shutdown(
 	}
 	
 	/*
-	 * Tell the I/O module to turn us off.  We're history.
+	 * cleanup before leaving this world
 	 */
-	io_closeclock(&parse->generic->io);
-
 	if (parse->binding)
 	    PARSE_END(parse);
 
+	/*
+	 * Tell the I/O module to turn us off.  We're history.
+	 */
+	io_closeclock(&parse->generic->io);
+
 	free_varlist(parse->kv);
   
 	NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
@@ -5735,6 +5744,12 @@ int refclock_parse_bs;
  * History:
  *
  * refclock_parse.c,v
+ * Revision 4.80  2007/08/11 12:06:29  kardel
+ * update comments wrt/ to PPS
+ *
+ * Revision 4.79  2007/08/11 11:52:23  kardel
+ * - terminate io bindings before io_closeclock() will close our file descriptor
+ *
  * Revision 4.78  2006/12/22 20:08:27  kardel
  * Bug 746 (RFE): add configuration for Expert mouseCLOCK USB v2.0 as mode 19
  *

#### ChangeSet ####
2007-08-09 20:30:55+00:00, kardel at pogo.udel.edu 
  ChangeLog:
    [Bug 882] allow loopback interfaces to share addresses with other interfaces.
    [Bug 884] don't access recv buffers after having them passed to the free list.

==== ChangeLog ====
2007-08-09 20:30:26+00:00, kardel at pogo.udel.edu +3 -0
  [Bug 882] allow loopback interfaces to share addresses with other interfaces.
  [Bug 884] don't access recv buffers after having them passed to the free list.

--- 1.1.1.23/ChangeLog	2007-06-29 15:30:58 -04:00
+++ 1.1.1.24/ChangeLog	2007-08-09 16:30:26 -04:00
@@ -1,3 +1,6 @@
+* [Bug 884] don't access recv buffers after having them passed to the free list.
+* [Bug 882] allow loopback interfaces to share addresses with other interfaces.
+
 ---
 (4.2.4p3) Released by Harlan Stenn <stenn at ntp.org>
 

#### ChangeSet ####
2007-08-09 19:05:17+00:00, kardel at pogo.udel.edu 
  ntp_io.c:
    Bug 884: no access to recv buffers after they are returned to free pool

==== ntpd/ntp_io.c ====
2007-08-09 19:01:30+00:00, kardel at pogo.udel.edu +9 -7
  Bug 884: no access to recv buffers after they are returned to free pool

--- 1.244.2.7/ntpd/ntp_io.c	2007-08-07 14:09:50 -04:00
+++ 1.244.2.8/ntpd/ntp_io.c	2007-08-09 15:01:30 -04:00
@@ -2896,35 +2896,37 @@ read_network_packet(SOCKET fd, struct in
 	rb->recv_length       = recvmsg(fd, &msghdr, 0);
 #endif
 
-	if (rb->recv_length == 0|| (rb->recv_length == -1 && 
+	buflen = rb->recv_length;
+
+	if (buflen == 0 || (buflen == -1 && 
 	    (errno==EWOULDBLOCK
 #ifdef EAGAIN
 	   || errno==EAGAIN
 #endif
 	 ))) {
 		freerecvbuf(rb);
-		return (rb->recv_length);
+		return (buflen);
 	}
-	else if (rb->recv_length < 0)
+	else if (buflen < 0)
 	{
 		netsyslog(LOG_ERR, "recvfrom(%s) fd=%d: %m",
 		stoa(&rb->recv_srcadr), fd);
 		DPRINTF(5, ("read_network_packet: fd=%d dropped (bad recvfrom)\n", fd));
 		freerecvbuf(rb);
-		return (rb->recv_length);
+		return (buflen);
 	}
 
 #ifdef DEBUG
 	if (debug > 2) {
 		if(rb->recv_srcadr.ss_family == AF_INET)
 			printf("read_network_packet: fd=%d length %d from %08lx %s\n",
-				fd, rb->recv_length,
+				fd, buflen,
 				(u_long)ntohl(((struct sockaddr_in*)&rb->recv_srcadr)->sin_addr.s_addr) &
 				0x00000000ffffffff,
 				stoa(&rb->recv_srcadr));
 		else
 			printf("read_network_packet: fd=%d length %d from %s\n",
-				fd, rb->recv_length,
+				fd, buflen,
 				stoa(&rb->recv_srcadr));
 	}
 #endif
@@ -2945,7 +2947,7 @@ read_network_packet(SOCKET fd, struct in
 
 	itf->received++;
 	packets_received++;
-	return (rb->recv_length);
+	return (buflen);
 }
 
 /*

#### ChangeSet ####
2007-08-07 18:14:16+00:00, kardel at pogo.udel.edu 
  ntp_io.c:
    Bug 882: loopback interfaces may share IP addresses with other interfaces
    	 thus allow addresses also found on loopback interfaces to be used
    	 as local address.

==== ntpd/ntp_io.c ====
2007-08-07 18:09:50+00:00, kardel at pogo.udel.edu +1 -1
  Bug 882: loopback interfaces may share IP addresses with other interfaces
  	 thus allow addresses also found on loopback interfaces to be used
  	 as local address.

--- 1.244.2.6/ntpd/ntp_io.c	2007-05-28 05:59:44 -04:00
+++ 1.244.2.7/ntpd/ntp_io.c	2007-08-07 14:09:50 -04:00
@@ -3137,7 +3137,7 @@ findinterface(
 {
 	struct interface *interface;
 	
-	interface = findlocalinterface(addr, INT_LOOPBACK|INT_WILDCARD);
+	interface = findlocalinterface(addr, INT_WILDCARD);
 
 	if (interface == NULL)
 	{


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