0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 08:38:42 +00:00

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.
This commit is contained in:
Ondrej Zajicek 2015-04-01 00:01:35 +02:00
parent 16a3254c4c
commit d924d5a562

View File

@ -769,7 +769,7 @@ bgp_schedule_packet(struct bgp_conn *conn, int type)
{ {
DBG("BGP: Scheduling packet type %d\n", type); DBG("BGP: Scheduling packet type %d\n", type);
conn->packets_to_send |= 1 << 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); ev_schedule(conn->tx_ev);
} }