summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_fsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 478f8c9136..940d93a8df 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -1260,7 +1260,7 @@ void bgp_fsm_change_status(struct peer_connection *connection,
/* Transition into Clearing or Deleted must /always/ clear all routes..
* (and must do so before actually changing into Deleted..
*/
- if (status >= Clearing && (peer->established || peer == bgp->peer_self)) {
+ if (status >= Clearing && (peer->established || peer != bgp->peer_self)) {
bgp_clear_route_all(peer);
/* If no route was queued for the clear-node processing,