diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-03-04 23:36:34 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-03-05 12:06:17 +0200 |
| commit | b4fc876a327a89dc212efa48a04b76e53263722f (patch) | |
| tree | a182c46b9649f84e815291fdd8022d6895a67937 | |
| parent | 3288ffdd2f6eed644e9f0966cf8cfa61e9e417e1 (diff) | |
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 <donatas@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgp_rpki.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index bd5a5b1ffa..0a51269d9b 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -369,7 +369,7 @@ static int 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, |
