summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--lib/libc/asr/asr.c23
-rw-r--r--share/man/man5/resolv.conf.511
2 files changed, 3 insertions, 31 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);
diff --git a/share/man/man5/resolv.conf.5 b/share/man/man5/resolv.conf.5
index 6430760c31b..580a16804d6 100644
--- a/share/man/man5/resolv.conf.5
+++ b/share/man/man5/resolv.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: resolv.conf.5,v 1.46 2014/11/05 15:12:23 jmc Exp $
+.\" $OpenBSD: resolv.conf.5,v 1.47 2015/10/28 11:52:26 deraadt Exp $
.\" $NetBSD: resolv.conf.5,v 1.7 1996/03/06 18:22:16 scottr Exp $
.\"
.\" Copyright (c) 1986, 1991 The Regents of the University of California.
@@ -30,7 +30,7 @@
.\"
.\" @(#)resolver.5 5.12 (Berkeley) 5/10/91
.\"
-.Dd $Mdocdate: November 5 2014 $
+.Dd $Mdocdate: October 28 2015 $
.Dt RESOLV.CONF 5
.Os
.Sh NAME
@@ -116,13 +116,6 @@ Scoped IPv6 address notation is accepted as well
(see
.Xr inet6 4
for details).
-A non-standard port may also be specified,
-with the host address enclosed in square brackets.
-For example:
-.Bd -literal -offset indent
-nameserver [10.0.0.1]:5353
-nameserver [::1]:5353
-.Ed
.Pp
Up to
.Dv MAXNS