mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
BFD: Fix invalid read from pollfd array
It is possible that sockets_add() are called between sockets_prepare() and sockets_fire() during poll loop in birdloop_main(), so we need to use loop->poll_fd.used instead of loop->sock_num to find the last field.
This commit is contained in:
parent
a290da25a1
commit
0f5054f685
@ -589,7 +589,7 @@ sockets_fire(struct birdloop *loop)
|
||||
times_update(loop);
|
||||
|
||||
/* Last fd is internal wakeup fd */
|
||||
if (pfd[loop->sock_num].revents & POLLIN)
|
||||
if (pfd[poll_num].revents & POLLIN)
|
||||
wakeup_drain(loop);
|
||||
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user