From: Ondrej Zajicek Date: Tue, 31 Mar 2015 22:01:35 +0000 (+0200) Subject: BGP: Fixes serious bug in TX handling X-Git-Tag: v1.5.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d924d5a5626397da7e71fddfb1c0fd22c2714f2c;p=thirdparty%2Fbird.git BGP: Fixes serious bug in TX handling Under some circumstances and heavy load, TX could be postponed until the session fails with hold timer expired. Thanks to Javor Kliachev for making the bug reproductible. --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 27d827295..4bd68f520 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -769,7 +769,7 @@ bgp_schedule_packet(struct bgp_conn *conn, int type) { DBG("BGP: Scheduling packet type %d\n", type); conn->packets_to_send |= 1 << type; - if (conn->sk && conn->sk->tpos == conn->sk->tbuf) + if (conn->sk && conn->sk->tpos == conn->sk->tbuf && !ev_active(conn->tx_ev)) ev_schedule(conn->tx_ev); }