summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-04-01 00:01:35 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2015-04-01 00:10:00 +0200
commitd924d5a5626397da7e71fddfb1c0fd22c2714f2c (patch)
tree47753bdb5ffc99935fa340684289e6f1b9ca4af6
parent16a3254c4cb592e7cfa3aea744e9fd58665d6367 (diff)
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.
-rw-r--r--proto/bgp/packets.c2
1 files changed, 1 insertions, 1 deletions
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);
}