Refactor prefix_adjout_withdraw()
authorclaudio <claudio@openbsd.org>
Wed, 2 Mar 2022 14:44:46 +0000 (14:44 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 2 Mar 2022 14:44:46 +0000 (14:44 +0000)
commit957262a22d3885a56acef60552cfebc760c0d09c
tree1583c3b6cff50d4238f49ecd798c7a7f179de01e
parentbce6894f9dae3a3d20aca93e78d9a60733fb2a85
Refactor prefix_adjout_withdraw()

Just pass the prefix to be withdrawn to the function and move the lookup
up. Adjust how the various accounting vars are updated so that the
values are decremented in the right cases. Do the same accounting dance
for prefix_adjout_destroy(). Adjust rde_up_flush_upcall() to directly
call prefix_adjout_withdraw() without calling it via up_generate_updates().
OK tb@
usr.sbin/bgpd/rde.c
usr.sbin/bgpd/rde.h
usr.sbin/bgpd/rde_rib.c
usr.sbin/bgpd/rde_update.c