* ospf6_interface.c: fix the way inactivity_timer is called. Because
inactivity_timer() deletes the neighbor from the neighbor_list, it
cannot be called by thread_execute() from inner side of the
neighbor_list for-loop.
(Although crash was already fixed in Quagga, it's better follow the
GNU Zebra logic).
[port from GNU Zebra]
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 0614e44..3ca5e2d 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -1069,7 +1069,7 @@
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_execute (master, inactivity_timer, on, 0);
+ thread_add_event (master, inactivity_timer, on, 0);
}
return CMD_SUCCESS;
@@ -1117,7 +1117,7 @@
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_execute (master, inactivity_timer, on, 0);
+ thread_add_event (master, inactivity_timer, on, 0);
}
return CMD_SUCCESS;
@@ -1352,7 +1352,7 @@
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_execute (master, inactivity_timer, on, 0);
+ thread_add_event (master, inactivity_timer, on, 0);
}
return CMD_SUCCESS;