summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/lib/isc/unix/socket.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-12-17 02:05:31 +0000
committerderaadt <deraadt@openbsd.org>2019-12-17 02:05:31 +0000
commitfd13a3a93e8fb556f7c152c47b4968895fe2d496 (patch)
tree1ba489a5c6147a686b38d5dc31ffb91433686ad0 /usr.sbin/bind/lib/isc/unix/socket.c
parentmerge in https://github.com/isc-projects/bind9/commit/b8a04d50a361.patch (diff)
downloadwireguard-openbsd-fd13a3a93e8fb556f7c152c47b4968895fe2d496.tar.xz
wireguard-openbsd-fd13a3a93e8fb556f7c152c47b4968895fe2d496.zip
Add back some SOCK_DNS to socket() calls, and add a few more while
here (since this codebase will only support dig & nslookup)
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix/socket.c')
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c
index fa8e8bf1d07..4b5b6c96e56 100644
--- a/usr.sbin/bind/lib/isc/unix/socket.c
+++ b/usr.sbin/bind/lib/isc/unix/socket.c
@@ -2427,7 +2427,7 @@ set_rcvbuf(void) {
int max = rcvbuf, min;
ISC_SOCKADDR_LEN_T len;
- fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ fd = socket(AF_INET, SOCK_DGRAM | SOCK_DNS, IPPROTO_UDP);
#if defined(ISC_PLATFORM_HAVEIPV6)
if (fd == -1) {
switch (errno) {
@@ -2565,10 +2565,10 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
if (dup_socket == NULL) {
switch (sock->type) {
case isc_sockettype_udp:
- sock->fd = socket(sock->pf, SOCK_DGRAM, IPPROTO_UDP);
+ sock->fd = socket(sock->pf, SOCK_DGRAM | SOCK_DNS, IPPROTO_UDP);
break;
case isc_sockettype_tcp:
- sock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
+ sock->fd = socket(sock->pf, SOCK_STREAM | SOCK_DNS, IPPROTO_TCP);
break;
case isc_sockettype_unix:
sock->fd = socket(sock->pf, SOCK_STREAM, 0);