summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevesk <stevesk@openbsd.org>2006-02-21 23:47:00 +0000
committerstevesk <stevesk@openbsd.org>2006-02-21 23:47:00 +0000
commit56e2fdf543163232181b3727dc05c636edae7387 (patch)
tree6372db52093e3c8f1923cf7e8b421c6108d58911
parentkrb5.conf lives in /etc/kerberosV (diff)
downloadwireguard-openbsd-56e2fdf543163232181b3727dc05c636edae7387.tar.xz
wireguard-openbsd-56e2fdf543163232181b3727dc05c636edae7387.zip
handle -1 return from host_dns(); ok henning@
-rw-r--r--usr.sbin/ntpd/ntpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index 1c8b2b18918..6d31ed2e294 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.40 2005/09/06 21:27:10 wvdputte Exp $ */
+/* $OpenBSD: ntpd.c,v 1.41 2006/02/21 23:47:00 stevesk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -292,7 +292,8 @@ dispatch_imsg(struct ntpd_conf *conf)
if (name[imsg.hdr.len] != '\0' ||
strlen(name) != imsg.hdr.len)
fatalx("invalid IMSG_HOST_DNS received");
- cnt = host_dns(name, &hn);
+ if ((cnt = host_dns(name, &hn)) == -1)
+ break;
buf = imsg_create(ibuf, IMSG_HOST_DNS,
imsg.hdr.peerid, 0,
cnt * sizeof(struct sockaddr_storage));