diff options
Diffstat (limited to 'src/router.c')
-rw-r--r-- | src/router.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/router.c b/src/router.c index e11fa01..36267be 100644 --- a/src/router.c +++ b/src/router.c @@ -309,7 +309,7 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add uint32_t this_lifetime = TIME_LEFT(addr->valid, now); if (this_lifetime > UINT16_MAX) this_lifetime = UINT16_MAX; - if (((addr->addr.s6_addr[0] & 0xfe) != 0xfc || iface->default_router) + if ((!IN6_IS_ADDR_ULA(&addr->addr) || iface->default_router) && adv.h.nd_ra_router_lifetime && ntohs(adv.h.nd_ra_router_lifetime) < this_lifetime) { adv.h.nd_ra_router_lifetime = htons(this_lifetime); |