summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/lib/isc/unix/socket.c
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2020-01-26 14:50:47 +0000
committerjca <jca@openbsd.org>2020-01-26 14:50:47 +0000
commitfaed5c292c5c57ae0d5f6e2911bfd6deca0a22da (patch)
treeed28df61d0396f2234755f2ed1544d6874844fa9 /usr.sbin/bind/lib/isc/unix/socket.c
parentgive pkg_create knowledge of WRKOBJDIR, so it can error out if a symlink (diff)
downloadwireguard-openbsd-faed5c292c5c57ae0d5f6e2911bfd6deca0a22da.tar.xz
wireguard-openbsd-faed5c292c5c57ae0d5f6e2911bfd6deca0a22da.zip
Support for queries on ports != 53
- dig(1) -p now works, as already supported by dig(1) from ports/net/isc-bind thanks to sthen@ - "set port=..." also works in nslookup(1) - host(1) has no support for alternate destination ports This adds "inet" to the pledge promises of all three programs, a compromise deemed reasonable and suggested by deraadt@; instead of slightly more complicated patches by myself and florian@ to avoid "inet" in the general case. Suggested by deraadt@, ok florian@ sthen@
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix/socket.c')
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c
index a3cd07937c2..a115ed1492f 100644
--- a/usr.sbin/bind/lib/isc/unix/socket.c
+++ b/usr.sbin/bind/lib/isc/unix/socket.c
@@ -1373,10 +1373,10 @@ opensocket(isc__socket_t *sock)
switch (sock->type) {
case isc_sockettype_udp:
- sock->fd = socket(sock->pf, SOCK_DGRAM | SOCK_DNS, IPPROTO_UDP);
+ sock->fd = socket(sock->pf, SOCK_DGRAM, IPPROTO_UDP);
break;
case isc_sockettype_tcp:
- sock->fd = socket(sock->pf, SOCK_STREAM | SOCK_DNS, IPPROTO_TCP);
+ sock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
break;
}