]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RPKI shouldn't process more packets when being stopped
authorMaria Matejka <mq@jmq.cz>
Sat, 30 Oct 2021 14:56:55 +0000 (14:56 +0000)
committerMaria Matejka <mq@ucw.cz>
Tue, 9 Nov 2021 18:20:41 +0000 (19:20 +0100)
proto/rpki/packets.c

index dd11f997cc0e2a70decbe19111f7ccefa54cbe58..2c37df76ba143326a7b753a349ad680d3a20ea33 100644 (file)
@@ -897,6 +897,9 @@ rpki_rx_hook(struct birdsock *sk, uint size)
   struct rpki_cache *cache = sk->data;
   struct rpki_proto *p = cache->p;
 
+  if ((p->p.proto_state == PS_DOWN) || (p->cache != cache))
+    return 0;
+
   byte *pkt_start = sk->rbuf;
   byte *end = pkt_start + size;