]> 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>
Sat, 18 May 2024 13:48:03 +0000 (15:48 +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 aa7e187da89171ed91c51f0cda18123272774602..851143fa881d60b32461b590629819798346069c 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)