0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

RPKI socket read is prioritized over other sockets

This commit is contained in:
Maria Matejka 2024-06-20 19:39:09 +02:00
parent f9b46a1ba1
commit 2c4b368176
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ rpki_tr_open(struct rpki_tr_sock *tr)
/* sk->type -1 is invalid value, a correct value MUST be set in the specific transport layer in open_fp() hook */
sk->type = -1;
sk->fast_rx = 1; /* We need to load the ROAs DAMN FAST */
sk->tx_hook = rpki_connected_hook;
sk->err_hook = rpki_err_hook;
sk->data = cache;

View File

@ -547,7 +547,7 @@ sockets_fire(struct birdloop *loop, _Bool read, _Bool write)
/* Read until task limit is up */
if (read && (rev & POLLIN))
while ((s == loop->sock_active) && s->rx_hook && sk_read(s, rev) && task_still_in_limit())
while ((s == loop->sock_active) && s->rx_hook && sk_read(s, rev) && (s->fast_rx || task_still_in_limit()))
;
if (s != loop->sock_active)