]> git.ipfire.org Git - thirdparty/bird.git/commit
BFD: fixed a request pickup race condition
authorMaria Matejka <mq@ucw.cz>
Wed, 5 Apr 2023 19:59:01 +0000 (21:59 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 6 Apr 2023 10:48:02 +0000 (12:48 +0200)
commit22a0900ec22511b6ce872f126e9766ccb4e5a824
treef1b15ebdebb05ef6d6d232bc06043da75d8f74e9
parent4a69a64745e44066abfa4f6a17a7bb7a2fde9834
BFD: fixed a request pickup race condition

When several BGPs requested a BFD session in short time, chances were
that the second BGP would file a request while the pickup routine was
still running and it would get enqueued into the waiting list instead of
being picked up.

Fixed this by enforcing pickup loop restart when new requests got added,
and also by atomically moving the unpicked requests to a temporary list
to announce admin down before actually being added into the wait list.
proto/bfd/bfd.c
proto/bfd/bfd.h
proto/bgp/bgp.c