]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix while(read()) for RPKI sync callback 10734/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 4 Mar 2022 21:36:34 +0000 (23:36 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 4 Mar 2022 22:14:37 +0000 (00:14 +0200)
Bad formatting applied and it worked with small amount of prefixes (lurking).

With full BGP feed and full RPKI table, this causes infinity loop.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_rpki.c

index 857462a601d26c2450efa31dcb7a91e627e0a340..c724b938d1c3f3aa8c1f4afb0a88ce9e29ac91a2 100644 (file)
@@ -369,7 +369,7 @@ static void bgpd_sync_callback(struct thread *thread)
        thread_add_read(bm->master, bgpd_sync_callback, NULL, socket, &t_rpki);
 
        if (atomic_load_explicit(&rtr_update_overflow, memory_order_seq_cst)) {
-               while (read(socket, &rec, sizeof(struct pfx_record) != -1))
+               while (read(socket, &rec, sizeof(struct pfx_record)) != -1)
                        ;
 
                atomic_store_explicit(&rtr_update_overflow, 0,