From: Benjamin Cama Date: Mon, 8 Aug 2011 11:51:32 +0000 (+0200) Subject: Don't process timers of disabled peers. X-Git-Tag: debian/2.2.1-1fdn2~3^2 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/49f8ea66ee9a729eeaadf8d8bc4dcbeb3ca10835?hp=-c Don't process timers of disabled peers. Signed-off-by: Benjamin Cama --- 49f8ea66ee9a729eeaadf8d8bc4dcbeb3ca10835 diff --git a/bgp.c b/bgp.c index 04ff767..80a445e 100644 --- a/bgp.c +++ b/bgp.c @@ -833,6 +833,7 @@ int bgp_process(uint32_t events[]) return 1; } +/* process bgp timers only */ void bgp_process_peers_timers() { int i; @@ -841,7 +842,14 @@ void bgp_process_peers_timers() return; for (i = 0; i < BGP_NUM_PEERS; i++) - bgp_process_timers(&bgp_peers[i]); + { + struct bgp_peer *peer = &bgp_peers[i]; + + if (peer->state == Disabled) + continue; + + bgp_process_timers(peer); + } } static void bgp_process_timers(struct bgp_peer *peer)