From d924d5a5626397da7e71fddfb1c0fd22c2714f2c Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 1 Apr 2015 00:01:35 +0200 Subject: 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. --- proto/bgp/packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 27d82729..4bd68f52 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); } -- cgit v1.2.3