summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/asr.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-28 11:52:26 +0000
committerderaadt <deraadt@openbsd.org>2015-10-28 11:52:26 +0000
commit74249a3f405d61c80e5453460faa4fab47069bdb (patch)
tree737c5700b373d4b29427502cc1b842e00557a22a /lib/libc/asr/asr.c
parentThere are three situations where pty ioctl's result in a NDINIT. (diff)
downloadwireguard-openbsd-74249a3f405d61c80e5453460faa4fab47069bdb.tar.xz
wireguard-openbsd-74249a3f405d61c80e5453460faa4fab47069bdb.zip
Remove support for [addr]:port syntax from the "nameserver" line.
This extension never made it to other systems. (pledge is also happy with this. The idea of DNS @ any port collides with pledge encouraring differentiation between DNS and non-DNS sockets) ok phessler jung sthen kettenis
Diffstat (limited to 'lib/libc/asr/asr.c')
-rw-r--r--lib/libc/asr/asr.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/libc/asr/asr.c b/lib/libc/asr/asr.c
index 7c13122a8cb..0a407b8c971 100644
--- a/lib/libc/asr/asr.c
+++ b/lib/libc/asr/asr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asr.c,v 1.46 2015/10/07 13:59:34 deraadt Exp $ */
+/* $OpenBSD: asr.c,v 1.47 2015/10/28 11:52:26 deraadt Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
@@ -750,29 +750,8 @@ asr_ctx_envopts(struct asr_ctx *ac)
static int
asr_parse_nameserver(struct sockaddr *sa, const char *s)
{
- const char *estr;
- char buf[256];
- char *port = NULL;
in_port_t portno = 53;
- if (*s == '[') {
- strlcpy(buf, s + 1, sizeof buf);
- s = buf;
- port = strchr(buf, ']');
- if (port == NULL)
- return (-1);
- *port++ = '\0';
- if (*port != ':')
- return (-1);
- port++;
- }
-
- if (port) {
- portno = strtonum(port, 1, USHRT_MAX, &estr);
- if (estr)
- return (-1);
- }
-
if (_asr_sockaddr_from_str(sa, PF_UNSPEC, s) == -1)
return (-1);