diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-10-15 23:39:59 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-10-15 23:39:59 +0000 |
commit | dcdf399fbc7420d3edc230c9646f720825fcecda (patch) | |
tree | d4712072c844fff67e49e44fc9503d0b11f8062f /bgpd/bgp_packet.c | |
parent | 876b8be0ab24721e8f94d47dde022563f76db992 (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_packet.c')
-rw-r--r-- | bgpd/bgp_packet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index da59d329..cf6d00f1 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -637,7 +637,7 @@ bgp_write (struct thread *thread) if (write_errno == EWOULDBLOCK || write_errno == EAGAIN) break; - BGP_EVENT_FLUSH_ADD (peer, TCP_fatal_error); + BGP_EVENT_ADD (peer, TCP_fatal_error); return 0; } if (num != writenum) @@ -672,7 +672,7 @@ bgp_write (struct thread *thread) peer->v_start = (60 * 2); /* Flush any existing events */ - BGP_EVENT_FLUSH_ADD (peer, BGP_Stop); + BGP_EVENT_ADD (peer, BGP_Stop); return 0; case BGP_MSG_KEEPALIVE: peer->keepalive_out++; @@ -717,7 +717,7 @@ bgp_write_notify (struct peer *peer) ret = writen (peer->fd, STREAM_DATA (s), stream_get_endp (s)); if (ret <= 0) { - BGP_EVENT_FLUSH_ADD (peer, TCP_fatal_error); + BGP_EVENT_ADD (peer, TCP_fatal_error); return 0; } @@ -737,7 +737,7 @@ bgp_write_notify (struct peer *peer) if (peer->v_start >= (60 * 2)) peer->v_start = (60 * 2); - BGP_EVENT_FLUSH_ADD (peer, BGP_Stop); + BGP_EVENT_ADD (peer, BGP_Stop); return 0; } |