]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Work once more with INET6 less kernels.
authorRoy Marples <roy@marples.name>
Mon, 7 Dec 2015 07:43:49 +0000 (07:43 +0000)
committerRoy Marples <roy@marples.name>
Mon, 7 Dec 2015 07:43:49 +0000 (07:43 +0000)
if.c

diff --git a/if.c b/if.c
index 0c32ba486a02621e0eae80078d6947db075c48e2..13734adcce385e1f6cf4b71bdf6b8967999b9280 100644 (file)
--- a/if.c
+++ b/if.c
@@ -94,14 +94,16 @@ if_opensockets(struct dhcpcd_ctx *ctx)
        if ((ctx->link_fd = if_openlinksocket()) == -1)
                return -1;
 
+       /* We use this socket for some operations without INET. */
        ctx->pf_inet_fd = xsocket(PF_INET, SOCK_DGRAM, 0, O_CLOEXEC);
        if (ctx->pf_inet_fd == -1)
                return -1;
 
 #if defined(INET6) && defined(BSD)
        ctx->pf_inet6_fd = xsocket(PF_INET6, SOCK_DGRAM, 0, O_CLOEXEC);
-       if (ctx->pf_inet6_fd == -1)
-               return -1;
+       /* Don't return an error so we at least work on kernels witout INET6
+        * even though we expect INET6 support.
+        * We will fail noisily elsewhere anyway. */
 #endif
 
 #ifdef IFLR_ACTIVE