From bfc30f16871ac0f622c553f568fda4a899f115d3 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 4 Mar 2022 23:36:34 +0200 Subject: [PATCH] bgpd: Fix while(read()) for RPKI sync callback 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 --- bgpd/bgp_rpki.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index 857462a601..c724b938d1 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -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, -- 2.39.5