diff options
author | 2015-02-11 03:16:57 +0000 | |
---|---|---|
committer | 2015-02-11 03:16:57 +0000 | |
commit | 1964b08c44e94cea80679678a44d897b4f1bc2e6 (patch) | |
tree | 4bfd8260954f3c27a55f5deae894552e8d65a60f | |
parent | sysctl({CTL_KERN, KERN_FILE, KERN_FILE_BYFILE}) previously required (diff) | |
download | wireguard-openbsd-1964b08c44e94cea80679678a44d897b4f1bc2e6.tar.xz wireguard-openbsd-1964b08c44e94cea80679678a44d897b4f1bc2e6.zip |
Remove dead code (IMSG_HOST_DNS has been moved from the parent to
ntp_dns some years ago).
OK henning@
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 4d04c4b35a4..283a3086a08 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.91 2015/02/10 11:46:39 reyk Exp $ */ +/* $OpenBSD: ntpd.c,v 1.92 2015/02/11 03:16:57 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -295,11 +295,8 @@ int dispatch_imsg(struct ntpd_conf *lconf) { struct imsg imsg; - int n, cnt; + int n; double d; - char *name; - struct ntp_addr *h, *hn; - struct ibuf *buf; if ((n = imsg_read(ibuf)) == -1) return (-1); @@ -346,34 +343,6 @@ dispatch_imsg(struct ntpd_conf *lconf) lconf->settime = 0; timeout = INFTIM; break; - case IMSG_HOST_DNS: - name = imsg.data; - if (imsg.hdr.len < 1 + IMSG_HEADER_SIZE) - fatalx("invalid IMSG_HOST_DNS received"); - imsg.hdr.len -= 1 + IMSG_HEADER_SIZE; - if (name[imsg.hdr.len] != '\0' || - strlen(name) != imsg.hdr.len) - fatalx("invalid IMSG_HOST_DNS received"); - if ((cnt = host_dns(name, &hn)) == -1) - break; - buf = imsg_create(ibuf, IMSG_HOST_DNS, - imsg.hdr.peerid, 0, - cnt * sizeof(struct sockaddr_storage)); - if (cnt > 0) { - if (buf) { - for (h = hn; h != NULL; h = h->next) - if (imsg_add(buf, &h->ss, - sizeof(h->ss)) == -1) { - buf = NULL; - break; - } - } - host_dns_free(hn); - hn = NULL; - } - if (buf) - imsg_close(ibuf, buf); - break; default: break; } |