Skip to content

Commit 1481407

Browse files
committed
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
1 parent 5905fbd commit 1481407

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/if-bsd.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,14 +743,11 @@ if_route(unsigned char cmd, const struct rt *rt)
743743
rtm->rtm_index = (unsigned short)rt->rt_ifp->index;
744744
/*
745745
* OpenBSD rejects this for on-link routes when there is no default route
746-
* FreeBSD-12 kernel apparently panics.
747-
* I can't replicate the panic, but better safe than sorry!
748-
*
749-
* Neither OS currently allows the same IPv6 address on different
746+
* OpenBSD does not allow the same IPv6 address on different
750747
* interfaces on the same network, so let's try to encourage someone to
751748
* fix that by logging a waring during compile.
752749
*/
753-
#if defined(__FreeBSD__) || defined(__OpenBSD__)
750+
#ifdef __OpenBSD__
754751
#warning kernel does not allow IPv6 address sharing
755752
if (!gateway_unspec || rt->rt_dest.sa_family!=AF_INET6)
756753
#endif

0 commit comments

Comments
 (0)