]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Fixed corking of RX
authorMaria Matejka <mq@ucw.cz>
Wed, 10 Apr 2024 14:14:40 +0000 (16:14 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 17 May 2024 07:12:51 +0000 (09:12 +0200)
If cork occurred after some incoming data had been already processed,
BGP incorrectly processed them again after uncorking because it forgot
to store the actual socket state.

Now storing the socket state (done at the end of bgp_rx()) and
therefore the bug is fixed.

proto/bgp/packets.c

index 77f106e228301a418f352ba72998d2a0d33de505..e63d47b0ee369811af8330f51b11f37b45a5e63c 100644 (file)
@@ -3500,7 +3500,7 @@ bgp_rx(sock *sk, uint size)
       {
        sk_pause_rx(p->p.loop, sk);
        BGP_TRACE(D_PACKETS, "Corked");
-       return 0;
+       break;
       }
       for(i=0; i<16; i++)
        if (pkt_start[i] != 0xff)