summaryrefslogtreecommitdiff
path: root/sbin/unwind/unwind.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-01-29 17:46:05 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-01-29 17:46:05 +0000
commit4284eb47d6821e5493dad7ab757eab29a8386aec (patch)
treecd9557b5960d798a7689aa57b18ba241249bfa51 /sbin/unwind/unwind.c
parent7ed9ed6d537e38db12ec633c1524ceb3f0db0bc2 (diff)
Don't filter by address family on the route socket.
While here also set SOCK_NONBLOCK on the frontend routesock.
Diffstat (limited to 'sbin/unwind/unwind.c')
-rw-r--r--sbin/unwind/unwind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c
index 00c600560e4..178d2d8e605 100644
--- a/sbin/unwind/unwind.c
+++ b/sbin/unwind/unwind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unwind.c,v 1.57 2021/01/27 08:30:50 florian Exp $ */
+/* $OpenBSD: unwind.c,v 1.58 2021/01/29 17:46:04 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -264,8 +264,8 @@ main(int argc, char *argv[])
if ((control_fd = control_init(csock)) == -1)
fatalx("control socket setup failed");
- if ((frontend_routesock = socket(AF_ROUTE, SOCK_RAW | SOCK_CLOEXEC,
- AF_INET)) == -1)
+ if ((frontend_routesock = socket(AF_ROUTE, SOCK_RAW | SOCK_CLOEXEC |
+ SOCK_NONBLOCK, 0)) == -1)
fatal("route socket");
rtfilter = ROUTE_FILTER(RTM_IFINFO) | ROUTE_FILTER(RTM_PROPOSAL)
@@ -276,7 +276,7 @@ main(int argc, char *argv[])
fatal("setsockopt(ROUTE_MSGFILTER)");
if ((routesock = socket(AF_ROUTE, SOCK_RAW | SOCK_CLOEXEC |
- SOCK_NONBLOCK, AF_INET6)) == -1)
+ SOCK_NONBLOCK, 0)) == -1)
fatal("route socket");
shutdown(SHUT_RD, routesock);