From: florian Date: Fri, 29 Jan 2021 17:46:04 +0000 (+0000) Subject: Don't filter by address family on the route socket. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5ebe2a79f621372f349157827dedf018570b1373;p=openbsd Don't filter by address family on the route socket. While here also set SOCK_NONBLOCK on the frontend routesock. --- 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 @@ -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);