summaryrefslogtreecommitdiff
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-10-15 23:39:59 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-10-15 23:39:59 +0000
commitdcdf399fbc7420d3edc230c9646f720825fcecda (patch)
treed4712072c844fff67e49e44fc9503d0b11f8062f /bgpd/bgp_fsm.c
parent876b8be0ab24721e8f94d47dde022563f76db992 (diff)
[bgpd] Bug #302 fixes. ClearingCompleted event gets flushed, leaving peers stuck in Clearing.
2006-10-14 Paul Jakma <paul.jakma@sun.com> * bgp_fsm.h: Remove BGP_EVENT_FLUSH_ADD, dangerous and not needed. * bgp_fsm.c: (bgp_stop) Move BGP_EVENT_FLUSH to the top of the of the function, otherwise it could flush a ClearingCompleted event, bug #302. * bgp_packet.c: Replace all BGP_EVENT_FLUSH_ADD with BGP_EVENT_ADD, fixing bug #302.
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index cc2b2c3a..ef8dfea4 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -428,6 +428,9 @@ bgp_stop (struct peer *peer)
safi_t safi;
char orf_name[BUFSIZ];
+ /* Delete all existing events of the peer */
+ BGP_EVENT_FLUSH (peer);
+
/* Increment Dropped count. */
if (peer->status == Established)
{
@@ -499,9 +502,6 @@ bgp_stop (struct peer *peer)
BGP_TIMER_OFF (peer->t_asorig);
BGP_TIMER_OFF (peer->t_routeadv);
- /* Delete all existing events of the peer */
- BGP_EVENT_FLUSH (peer);
-
/* Stream reset. */
peer->packet_size = 0;