]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: clear DR info on interface_down
authorChristian Franke <chris@opensourcerouting.org>
Thu, 13 Dec 2012 12:50:28 +0000 (13:50 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 20 Nov 2013 09:35:59 +0000 (10:35 +0100)
This fixes an issue where ospf6d would send incorrect hellos and
perform wrong DR election when an interface went down and up
again.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
ospf6d/ospf6_interface.c

index c692f2c7d3214e413ecc6d10d6aed85d42553c42..86c0bf6882134f3a084e19aafa9e9a376e1eac24 100644 (file)
@@ -769,6 +769,10 @@ interface_down (struct thread *thread)
   
   list_delete_all_node (oi->neighbor_list);
 
+  /* When interface state is reset, also reset information about
+   * DR election, as it is no longer valid. */
+  oi->drouter = oi->prev_drouter = htonl(0);
+  oi->bdrouter = oi->prev_bdrouter = htonl(0);
   return 0;
 }