summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-09-14 22:01:29 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-09-14 22:01:29 +0000
commitdcf13a4ee86f686c2eae187f266a04dc83e99f5f (patch)
tree920e538b13a4f97801c26c344d5f4896bc1fa414
parentaecbdc208830aecf6ddb6fe28f858431bd881142 (diff)
paranoia: reset query->fd to -1 after close, from canacar some time ago
-rw-r--r--usr.sbin/ntpd/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index d9d868f3265..10a95fed44b 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.32 2004/08/16 11:14:15 otto Exp $ */
+/* $OpenBSD: client.c,v 1.33 2004/09/14 22:01:28 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -96,6 +96,7 @@ int
client_nextaddr(struct ntp_peer *p)
{
close(p->query->fd);
+ p->query->fd = -1;
if (p->addr_head.a == NULL) {
ntp_host_dns(p->addr_head.name, p->id);