summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2019-01-26 16:49:35 +0100
committerRafael Zalamena <rzalamena@opensourcerouting.org>2019-01-26 16:55:27 +0100
commitbc482dc0caeed76505623426edf58c6de48f013e (patch)
treee32558f69c16d99d7371eed235d28e5cf361882e /ospf6d/ospf6_interface.c
parentospf6d: keep track of the socket set thread (diff)
downloadfrr-bc482dc0caeed76505623426edf58c6de48f013e.tar.xz
frr-bc482dc0caeed76505623426edf58c6de48f013e.zip
ospf6d: fix FreeBSD IPv6 multicast group join race
Avoid a IPv6 multicast group join race by delaying the group install before processing all event queue. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index abdf244c8..dd08144da 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -729,6 +729,22 @@ int interface_up(struct thread *thread)
return 0;
}
+#ifdef __FreeBSD__
+ /*
+ * XXX: Schedule IPv6 group join for later, otherwise we might
+ * lose the multicast group registration caused by IPv6 group
+ * leave race.
+ */
+ if (oi->sso_try_cnt == 0) {
+ oi->sso_try_cnt++;
+ zlog_info("Scheduling %s for sso", oi->interface->name);
+ thread_add_timer(master, interface_up, oi,
+ OSPF6_INTERFACE_SSO_RETRY_INT,
+ &oi->thread_sso);
+ return 0;
+ }
+#endif /* __FreeBSD__ */
+
/* Join AllSPFRouters */
if (ospf6_sso(oi->interface->ifindex, &allspfrouters6, IPV6_JOIN_GROUP)
< 0) {