From: Roy Marples Date: Wed, 15 Jan 2025 19:06:52 +0000 (+0000) Subject: BSD: FreeBSD allows RTA_IFP correctly. X-Git-Tag: v10.2.0~22 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1481407c6c952cc2efb631875524a40da07a104d;p=thirdparty%2Fdhcpcd.git BSD: FreeBSD allows RTA_IFP correctly. Not that it allows the same IPv6 address on different interfaces on the same network still, but that's a FreeBSD issue to fix later. The last for #407 --- diff --git a/src/if-bsd.c b/src/if-bsd.c index b752e25c..5b4c43a0 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -743,14 +743,11 @@ if_route(unsigned char cmd, const struct rt *rt) rtm->rtm_index = (unsigned short)rt->rt_ifp->index; /* * OpenBSD rejects this for on-link routes when there is no default route - * FreeBSD-12 kernel apparently panics. - * I can't replicate the panic, but better safe than sorry! - * - * Neither OS currently allows the same IPv6 address on different + * OpenBSD does not allow the same IPv6 address on different * interfaces on the same network, so let's try to encourage someone to * fix that by logging a waring during compile. */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#ifdef __OpenBSD__ #warning kernel does not allow IPv6 address sharing if (!gateway_unspec || rt->rt_dest.sa_family!=AF_INET6) #endif