X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Frouter.c;h=60d6b3f3b39d39575b7bbc9f69ab3ac9ecde7bc7;hp=3d26c5845fd96a08d2ddf1ca7bd7340d1b318481;hb=7103b67707aac1a44b64211b45eca9c5c54bef2d;hpb=549a4a7d93a828d7d2b9354bc1b1957de4333e65 diff --git a/src/router.c b/src/router.c index 3d26c58..60d6b3f 100644 --- a/src/router.c +++ b/src/router.c @@ -176,7 +176,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, false, 0, 0, 0}; + struct odhcpd_ipaddr p = {IN6ADDR_ANY_INIT, 0, 0, 0, 0}; while (fgets(line, sizeof(line), fp_route)) { uint32_t rflags; if (sscanf(line, "00000000000000000000000000000000 00 " @@ -262,7 +262,7 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add for (ssize_t i = 0; i < ipcnt; ++i) { struct odhcpd_ipaddr *addr = &addrs[i]; - if (addr->prefix > 96 || addr->has_class) + if (addr->prefix > 96) continue; // Address not suitable if (addr->preferred > MaxPreferredTime)