Introduce a semaphore to protect intermediate state from different RTR
authorclaudio <claudio@openbsd.org>
Tue, 28 Mar 2023 12:15:23 +0000 (12:15 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 28 Mar 2023 12:15:23 +0000 (12:15 +0000)
commitdfd27b08d9d9ea2afef633e78123d48fa84f95c5
tree01b59eb89bcec1183c962e4ee727fd73e4a010c4
parent093d1e70949a865c68b2fc87eb41732302ae7914
Introduce a semaphore to protect intermediate state from different RTR
sessions to leak into the RDE via rtr_recalc. Only run rtr_recalc when
the last or only RTR session is done with the update. Run a new timer
along to ensure that the semaphore is not hold forever. The timeout
is currently a very generous 60sec, no RTR cache should be that slow.
OK tb@
usr.sbin/bgpd/bgpd.h
usr.sbin/bgpd/rtr.c
usr.sbin/bgpd/rtr_proto.c
usr.sbin/bgpd/session.h