X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Fndp.c;h=2aa55be6e94bc54c00397975f51c05c68b13a9a5;hp=d1683b9a90f84fd0b6b9f6c6015ac0082ac2ebee;hb=053ca41a841aa4a1b1ce86ce6ee9f4304cba7027;hpb=01bfec4c333d906ca4d2230c804dfe361779f42f diff --git a/src/ndp.c b/src/ndp.c index d1683b9..2aa55be 100644 --- a/src/ndp.c +++ b/src/ndp.c @@ -417,6 +417,22 @@ static void handle_rtnetlink(_unused void *addr, void *data, size_t len, if (iface->dhcpv6 == RELAYD_SERVER) iface->ia_reconf = true; + + if (iface->ndp == RELAYD_RELAY && iface->master) { + // Replay address changes on all slave interfaces + nh->nlmsg_flags = NLM_F_REQUEST; + + if (nh->nlmsg_type == RTM_NEWADDR) + nh->nlmsg_flags |= NLM_F_CREATE | NLM_F_REPLACE; + + struct interface *c; + list_for_each_entry(c, &interfaces, head) { + if (c->ndp == RELAYD_RELAY && !c->master) { + ndm->ndm_ifindex = c->ifindex; + send(rtnl_event.uloop.fd, nh, nh->nlmsg_len, MSG_DONTWAIT); + } + } + } } }