Skip to content

Commit

Permalink
ospf6d: fix FreeBSD IPv6 multicast group join race
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rzalamena committed Jan 26, 2019
1 parent f80003b commit bc482dc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ospf6d/ospf6_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bc482dc

Please sign in to comment.