diff options
author | paulo <paul@bayleaf.org.uk> | 2010-02-01 15:38:06 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-02-01 15:38:06 +0000 |
commit | 6e75be0d8cb3810692b78292f827b58f69a4c67c (patch) | |
tree | 5b853a822d332a36840f355d7851c06cf7985493 /bgpd/bgp_route.c | |
parent | d5f02454cbd702fe23c8977d49e1c5420b02e362 (diff) | |
download | quagga-6e75be0d8cb3810692b78292f827b58f69a4c67c.tar.bz2 quagga-6e75be0d8cb3810692b78292f827b58f69a4c67c.tar.xz |
In bgp_route.c bgp_maximum_prefix_overfow arrange for peer to be
disabled then enabled by timer. Replaced calls to bgp_peer_reenable
with bgp_send_notify which updates peer->last_reset as well as
reenabling peer.
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index d592e970..37a39ffc 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1721,22 +1721,23 @@ bgp_maximum_prefix_overflow (struct peer *peer, afi_t afi, ndata[6] = (peer->pmax[afi][safi]); SET_FLAG (peer->sflags, PEER_STATUS_PREFIX_OVERFLOW); - bgp_notify_send_with_data (peer, BGP_NOTIFY_CEASE, + /* Disable the peer, the timer routine will reenable. */ + bgp_notify_send_with_data_disable (peer, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_MAX_PREFIX, ndata, 7); } /* restart timer start */ if (peer->pmax_restart[afi][safi]) - { - peer->v_pmax_restart = peer->pmax_restart[afi][safi] * 60; + { + peer->v_pmax_restart = peer->pmax_restart[afi][safi] * 60; - if (BGP_DEBUG (events, EVENTS)) - zlog_debug ("%s Maximum-prefix restart timer started for %d secs", - peer->host, peer->v_pmax_restart); + if (BGP_DEBUG (events, EVENTS)) + zlog_debug ("%s Maximum-prefix restart timer started for %d secs", + peer->host, peer->v_pmax_restart); - BGP_TIMER_ON (peer->t_pmax_restart, bgp_maximum_prefix_restart_timer, - peer->v_pmax_restart); - } + BGP_TIMER_ON (peer->t_pmax_restart, bgp_maximum_prefix_restart_timer, + peer->v_pmax_restart); + } return 1; } |