summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
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)