]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
BSD: Allow non NetBSD and OpenBSD to set IN6_IFF_AUTOCONF
authorRoy Marples <roy@marples.name>
Tue, 16 Jun 2020 10:26:25 +0000 (10:26 +0000)
committerRoy Marples <roy@marples.name>
Tue, 16 Jun 2020 10:26:25 +0000 (10:26 +0000)
I don't think FreeBSD or DragonFly ever filtered it out, so
all the BSD family should now have parity here.

src/if-bsd.c

index b10017159ef370d87632d3482d0ddedac3d47bc5..090b587b00f5c1a1c3c3e6b8ebfcf02ef33471d9 100644 (file)
@@ -1002,7 +1002,10 @@ if_address6(unsigned char cmd, const struct ipv6_addr *ia)
        if (ia->addr_flags & IN6_IFF_TENTATIVE)
                ifa.ifra_flags |= IN6_IFF_TENTATIVE;
 #endif
-#if !defined(IPV6CTL_ACCEPT_RTADV) && !defined(ND6_IFF_ACCEPT_RTADV)
+#if (defined(__NetBSD__) || defined(__OpenBSD__)) && \
+    (defined(IPV6CTL_ACCEPT_RTADV) || defined(ND6_IFF_ACCEPT_RTADV))
+       /* These kernels don't accept userland setting IN6_IFF_AUTOCONF */
+#else
        if (ia->flags & IPV6_AF_AUTOCONF)
                ifa.ifra_flags |= IN6_IFF_AUTOCONF;
 #endif