summaryrefslogtreecommitdiffstats
path: root/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-12-07 07:43:49 +0000
committerRoy Marples <roy@marples.name>2015-12-07 07:43:49 +0000
commitef2a6232d46ab180cbc5351fd5bf138acc579851 (patch)
tree2b94d4ed95142549530191723ff85db820d33155 /if.c
parent5a0dba229553472c3b6f7ce5b8a01967043e4d64 (diff)
downloaddhcpcd-ef2a6232d46ab180cbc5351fd5bf138acc579851.tar.xz
Work once more with INET6 less kernels.
Diffstat (limited to 'if.c')
-rw-r--r--if.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/if.c b/if.c
index 0c32ba48..13734adc 100644
--- 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