summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2013-11-23 16:55:36 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2014-03-18 08:45:29 +0100
commit424cc3bd48da0f417c9056c5c2ade697a3386cd4 (patch)
tree1d0e9a71f6c27b64d435c276a100f046c30e2a8b /ospf6d/ospf6_interface.c
parent11b4f01355703d34099d4da145c7d92e32d98636 (diff)
downloadquagga-424cc3bd48da0f417c9056c5c2ade697a3386cd4.tar.bz2
quagga-424cc3bd48da0f417c9056c5c2ade697a3386cd4.tar.xz
ospf6d: fix interface_down() stopping hellos
interface_down() - which also handles some nonobvious cases like the last linklocal address disappearing - was previously not cancelling the hello timer. This had the effect of multiple such threads ending up scheduled after a quick down-up cycle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 8d427645..b0f11194 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -683,7 +683,7 @@ interface_up (struct thread *thread)
/* Schedule Hello */
if (! CHECK_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE))
- thread_add_event (master, ospf6_hello_send, oi, 0);
+ oi->thread_send_hello = thread_add_event (master, ospf6_hello_send, oi, 0);
/* decide next interface state */
if ((if_is_pointopoint (oi->interface)) ||
@@ -771,6 +771,9 @@ interface_down (struct thread *thread)
zlog_debug ("Interface Event %s: [InterfaceDown]",
oi->interface->name);
+ /* Stop Hellos */
+ THREAD_OFF (oi->thread_send_hello);
+
/* Leave AllSPFRouters */
if (oi->state > OSPF6_INTERFACE_DOWN)
ospf6_sso (oi->interface->ifindex, &allspfrouters6, IPV6_LEAVE_GROUP);