]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile for non-sun
authorRoy Marples <roy@marples.name>
Tue, 23 Apr 2019 17:34:27 +0000 (18:34 +0100)
committerRoy Marples <roy@marples.name>
Tue, 23 Apr 2019 17:34:27 +0000 (18:34 +0100)
src/ipv6nd.c

index 59742ad2f19b8ddc984a8a878dd2276109dcff0f..76e34e02388a013105a1532a71699a4aba51464b 100644 (file)
@@ -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