From d02dc222e61e2464bf850a629030c8a8b9b57ee8 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 2 Dec 2013 14:16:09 +0100 Subject: Initial prefix class support --- src/router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/router.c') diff --git a/src/router.c b/src/router.c index 9258acf..5abf1e6 100644 --- a/src/router.c +++ b/src/router.c @@ -169,7 +169,7 @@ static bool parse_routes(struct odhcpd_ipaddr *n, ssize_t len) char line[512], ifname[16]; bool found_default = false; - struct odhcpd_ipaddr p = {IN6ADDR_ANY_INIT, 0, 0, 0}; + struct odhcpd_ipaddr p = {IN6ADDR_ANY_INIT, 0, false, 0, 0, 0}; while (fgets(line, sizeof(line), fp_route)) { uint32_t rflags; if (sscanf(line, "00000000000000000000000000000000 00 " @@ -254,7 +254,7 @@ static void send_router_advert(struct uloop_timeout *event) for (ssize_t i = 0; i < ipcnt; ++i) { struct odhcpd_ipaddr *addr = &addrs[i]; - if (addr->prefix > 64) + if (addr->prefix > 64 || addr->has_class) continue; // Address not suitable if (addr->preferred > MaxPreferredTime) -- cgit v1.2.3