summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-12-02 14:16:09 +0100
committerSteven Barth <steven@midlink.org>2013-12-02 14:16:09 +0100
commitd02dc222e61e2464bf850a629030c8a8b9b57ee8 (patch)
tree7f7164151f58e9b88b3e489ea30c731526f058a6 /src/router.c
parent16cee36ff3cf1895f87368709dabd3ffd5f24e4f (diff)
Initial prefix class support
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c4
1 files changed, 2 insertions, 2 deletions
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)