changeset 5364:fe45c5b59de1 draft

BSD: Allow non NetBSD and OpenBSD to set IN6_IFF_AUTOCONF I don't think FreeBSD or DragonFly ever filtered it out, so all the BSD family should now have parity here.
author Roy Marples <roy@marples.name>
date Tue, 16 Jun 2020 10:26:25 +0000
parents e161ef164608
children 57b9f2292dfb
files src/if-bsd.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/if-bsd.c	Tue Jun 16 00:48:42 2020 +0100
+++ b/src/if-bsd.c	Tue Jun 16 10:26:25 2020 +0000
@@ -1002,7 +1002,10 @@
 	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