summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/router.c b/src/router.c
index ec0bee0..976e28a 100644
--- a/src/router.c
+++ b/src/router.c
@@ -712,10 +712,17 @@ static void handle_icmpv6(void *addr, void *data, size_t len,
if (hdr->icmp6_type == ND_ROUTER_SOLICIT)
send_router_advert(iface, &from->sin6_addr);
} else if (iface->ra == MODE_RELAY) { /* Relay mode */
- if (hdr->icmp6_type == ND_ROUTER_ADVERT && iface->master)
+ if (hdr->icmp6_type == ND_ROUTER_SOLICIT && !iface->master) {
+ struct interface *c;
+
+ avl_for_each_element(&interfaces, c, avl) {
+ if (!c->master || c->ra != MODE_RELAY)
+ continue;
+
+ forward_router_solicitation(c);
+ }
+ } else if (hdr->icmp6_type == ND_ROUTER_ADVERT && iface->master)
forward_router_advertisement(iface, data, len);
- else if (hdr->icmp6_type == ND_ROUTER_SOLICIT && !iface->master)
- forward_router_solicitation(odhcpd_get_master_interface());
}
}