Skip to content

Commit

Permalink
BSD: Remove IPv6 sharing warning
Browse files Browse the repository at this point in the history
This doesn't seem to be needed for on recent FreeBSD and OpenBSD.
  • Loading branch information
rsmarples committed Oct 7, 2024
1 parent 57c3506 commit e3c5de1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/if-bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,19 +741,6 @@ if_route(unsigned char cmd, const struct rt *rt)
!sa_is_loopback(&rt->rt_gateway))
{
rtm->rtm_index = (unsigned short)rt->rt_ifp->index;
/*
* OpenBSD rejects the message for on-link routes.
* FreeBSD-12 kernel apparently panics.
* I can't replicate the panic, but better safe than sorry!
* https://roy.marples.name/archives/dhcpcd-discuss/0002286.html
*
* Neither OS currently allows IPv6 address sharing anyway, so let's
* try to encourage someone to fix that by logging a waring during compile.
*/
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#warning kernel does not allow IPv6 address sharing
if (!gateway_unspec || rt->rt_dest.sa_family!=AF_INET6)
#endif
rtm->rtm_addrs |= RTA_IFP;
if (!sa_is_unspecified(&rt->rt_ifa))
rtm->rtm_addrs |= RTA_IFA;
Expand Down

0 comments on commit e3c5de1

Please sign in to comment.