]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: fix interface_down() stopping hellos
authorDavid Lamparter <equinox@opensourcerouting.org>
Sat, 23 Nov 2013 15:55:36 +0000 (16:55 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 18 Mar 2014 07:45:29 +0000 (08:45 +0100)
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>
ospf6d/ospf6_interface.c

index 8d4276458db323a4cfcac6434bd17f2bf4df1436..b0f11194acc2e6fab319daaf85b63e691a0f2bc6 100644 (file)
@@ -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);