static void trigger_router_advert(struct uloop_timeout *event);
static void sigusr1_refresh(int signal);
-static struct odhcpd_event router_event = {{.fd = -1}, handle_icmpv6, NULL};
+static struct odhcpd_event router_event = {.uloop = {.fd = -1}, .handle_dgram = handle_icmpv6, };
static FILE *fp_route = NULL;
#define RA_IOV_LEN 6
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);