]> git.puffer.fish Git - mirror/frr.git/commitdiff
[bgpd] Bug #302, bgpd can get stuck in state Clearing
authorPaul Jakma <paul.jakma@sun.com>
Fri, 8 Dec 2006 00:31:22 +0000 (00:31 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 8 Dec 2006 00:31:22 +0000 (00:31 +0000)
2006-12-07 Paul Jakma <paul.jakma@sun.com>

* bgp_fsm.c: Bug #302 fix, diagnosis, suggestions and testing
  by Juergen Kammer <j.kammer@eurodata.de>. Fix follows from
  his suggested fix, just made in a slightly different way.
  (bgp_event) Transitions into Clearing always must call
  bgp_clear_route_all().
  (bgp_stop) No need to clear routes here, BGP FSM should do
  it.

bgpd/ChangeLog
bgpd/bgp_fsm.c

index 7ad200a13381f9cf6d9ffae1ac618c5804c631f3..97f78caa4fa88004f9241ba4667bcde9ae2f0af3 100644 (file)
@@ -1,3 +1,13 @@
+2006-12-07 Paul Jakma <paul.jakma@sun.com>
+
+       * bgp_fsm.c: Bug #302 fix, diagnosis, suggestions and testing
+         by Juergen Kammer <j.kammer@eurodata.de>. Fix follows from
+         his suggested fix, just made in a slightly different way.
+         (bgp_event) Transitions into Clearing always must call
+         bgp_clear_route_all().
+         (bgp_stop) No need to clear routes here, BGP FSM should do
+         it.
 2006-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * bgp_debug.h: Declare new bgp_debug_zebra conf and term flags,
index ef8dfea43e140acc92f102b13278208531a1b6df..d704c29758216d42839b3ef74e2f4e1cbde960e9 100644 (file)
@@ -483,9 +483,6 @@ bgp_stop (struct peer *peer)
       /* Reset uptime. */
       bgp_uptime_reset (peer);
 
-      /* Need of clear of peer. */
-      bgp_clear_route_all (peer);
-
       /* Reset peer synctime */
       peer->synctime = 0;
     }
@@ -1092,8 +1089,14 @@ bgp_event (struct thread *thread)
     {
       /* If status is changed. */
       if (next != peer->status)
-        bgp_fsm_change_status (peer, next);
-
+        {
+          /* Transition into Clearing must /always/ clear all routes.. */
+          if (next == Clearing)
+            bgp_clear_route_all (peer);
+          
+          bgp_fsm_change_status (peer, next);
+        }
+      
       /* Make sure timer is set. */
       bgp_timer_set (peer);
     }