diff options
author | Steven Barth <steven@midlink.org> | 2015-07-14 20:49:02 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-07-14 20:49:02 +0200 |
commit | 42cdb6d45ac8dd677f40fe66c72c6028e853fc89 (patch) | |
tree | 6289926e2157fa8235ae865de5cf642519c15630 | |
parent | 01bfec4c333d906ca4d2230c804dfe361779f42f (diff) |
ndp: reintroduce address replay
-rw-r--r-- | src/ndp.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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); + } + } + } } } |