From: Roy Marples Date: Tue, 16 Jun 2020 10:26:25 +0000 (+0000) Subject: BSD: Allow non NetBSD and OpenBSD to set IN6_IFF_AUTOCONF X-Git-Tag: v9.1.3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51954c915aa6914486fc386cbe1e9aece02d368c;p=thirdparty%2Fdhcpcd.git 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. --- diff --git a/src/if-bsd.c b/src/if-bsd.c index b1001715..090b587b 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -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