]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix BSD for making routes.
authorRoy Marples <roy@marples.name>
Fri, 8 Apr 2016 08:29:52 +0000 (08:29 +0000)
committerRoy Marples <roy@marples.name>
Fri, 8 Apr 2016 08:29:52 +0000 (08:29 +0000)
if-bsd.c

index fd5e990b2384c4e3f550d9155a877b19df70612e..178300ebfd28a05be40db765c90a169bd8bd3402 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -141,8 +141,9 @@ if_opensockets_os(struct dhcpcd_ctx *ctx)
        priv->pf_inet6_fd = -1;
 #endif
 
-       ctx->pf_link_fd = xsocket(PF_LINK, SOCK_DGRAM, 0, SOCK_CLOEXEC);
-       return ctx->pf_link_fd == -1 ? -1 : 0;
+       ctx->link_fd = xsocket(PF_ROUTE, SOCK_RAW, 0,
+           SOCK_CLOEXEC | SOCK_NONBLOCK);
+       return ctx->link_fd == -1 ? -1 : 0;
 }
 
 void