Merge pull request #10734 from ton31337/fix/rpki_read

bgpd: Fix while(read()) for RPKI sync callback
This commit is contained in:
Jafar Al-Gharaibeh 2022-03-05 01:55:53 -06:00 committed by GitHub
commit 5e5cd2784f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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,