summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorkardel <kardel@NetBSD.org>2007-08-18 09:56:13 +0000
committerkardel <kardel@NetBSD.org>2007-08-18 09:56:13 +0000
commita097fb65ebaabba1aee2beeeeaf9810b0c19d114 (patch)
tree915e8d7cc0d24c9a2609a6c6e7f3ed72ba1c9df9 /dist
parent7d3c830b7c4322b4d7d49b97b132a8e18cf03d48 (diff)
pick up upcoming fixes from NTP-Bug 885
Diffstat (limited to 'dist')
-rw-r--r--dist/ntp/ntpd/cmd_args.c6
-rw-r--r--dist/ntp/ntpd/ntp_io.c4
-rw-r--r--dist/ntp/ntpd/refclock_parse.c11
3 files changed, 12 insertions, 9 deletions
diff --git a/dist/ntp/ntpd/cmd_args.c b/dist/ntp/ntpd/cmd_args.c
index f2801b27a02..c765d91180f 100644
--- a/dist/ntp/ntpd/cmd_args.c
+++ b/dist/ntp/ntpd/cmd_args.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmd_args.c,v 1.4 2007/01/06 19:45:22 kardel Exp $ */
+/* $NetBSD: cmd_args.c,v 1.5 2007/08/18 09:56:14 kardel Exp $ */
/*
* cmd_args.c = command-line argument processing
@@ -25,7 +25,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;
@@ -128,7 +128,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);
diff --git a/dist/ntp/ntpd/ntp_io.c b/dist/ntp/ntpd/ntp_io.c
index f94ba762c08..4c99a6353c1 100644
--- a/dist/ntp/ntpd/ntp_io.c
+++ b/dist/ntp/ntpd/ntp_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_io.c,v 1.24 2007/06/24 16:55:14 kardel Exp $ */
+/* $NetBSD: ntp_io.c,v 1.25 2007/08/18 09:56:14 kardel Exp $ */
/*
* ntp_io.c - input/output routines for ntpd. The socket-opening code
@@ -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;
diff --git a/dist/ntp/ntpd/refclock_parse.c b/dist/ntp/ntpd/refclock_parse.c
index d276d292930..e133f9d8d9e 100644
--- a/dist/ntp/ntpd/refclock_parse.c
+++ b/dist/ntp/ntpd/refclock_parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: refclock_parse.c,v 1.8 2007/01/06 19:45:23 kardel Exp $ */
+/* $NetBSD: refclock_parse.c,v 1.9 2007/08/18 09:56:13 kardel Exp $ */
/*
* /src/NTP/REPOSITORY/ntp4-dev/ntpd/refclock_parse.c,v 4.78 2006/12/22 20:08:27 kardel RELEASE_20061222_A
@@ -2635,13 +2635,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 */