summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaul <paul>2006-12-08 00:31:22 +0000
committerpaul <paul>2006-12-08 00:31:22 +0000
commita1a26ba709d3e809deac1e7f65be9ae1476400b3 (patch)
tree164eaee5cb2f0d58977febecaa8674c68e65d087
parent1567d7e042ac179d678f6211c53210bf5ced6f58 (diff)
downloadquagga-a1a26ba709d3e809deac1e7f65be9ae1476400b3.tar.bz2
quagga-a1a26ba709d3e809deac1e7f65be9ae1476400b3.tar.xz
[bgpd] Bug #302, bgpd can get stuck in state Clearing
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.
-rw-r--r--bgpd/ChangeLog10
-rw-r--r--bgpd/bgp_fsm.c13
2 files changed, 18 insertions, 5 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 7ad200a1..97f78caa 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -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,
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index ef8dfea4..d704c297 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -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);
}