summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-04-23 18:34:27 +0100
committerRoy Marples <roy@marples.name>2019-04-23 18:34:27 +0100
commit996a9e6fccf33ce4a3b4ff2c50fcfdbe6ca7ef9c (patch)
tree03633ce062334d611008c610918e07424bc4e81f /src/ipv6nd.c
parentdbd833af35185fc90846551174b31931f56219a0 (diff)
downloaddhcpcd-996a9e6fccf33ce4a3b4ff2c50fcfdbe6ca7ef9c.tar.xz
Fix compile for non-sun
Diffstat (limited to 'src/ipv6nd.c')
-rw-r--r--src/ipv6nd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index 59742ad2..76e34e02 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -265,11 +265,15 @@ ipv6nd_open(struct interface *ifp)
static int
ipv6nd_open(struct dhcpcd_ctx *ctx)
{
- int on;
+ int s, on;
if (ctx->nd_fd != -1)
return ctx->nd_fd;
+ s = ipv6nd_open0();
+ if (s == -1)
+ return -1;
+
on = 1;
if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO,
&on, sizeof(on)) == -1)
@@ -1809,7 +1813,9 @@ ipv6nd_startrs1(void *arg)
logerr(__func__);
return;
}
+#ifdef __sun
state->nd_fd = -1;
+#endif
}
#ifdef __sun