diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-07-01 14:16:24 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-07-01 14:22:06 +0200 |
commit | 06bb44c884e988d9ebed5176a7fd1bcf1b0f8afc (patch) | |
tree | 65a4296f1be4af8bd99738b277b537368f5baa84 /bgpd/bgp_conditional_adv.c | |
parent | bgpd: rename update_type enum values (diff) | |
download | frr-06bb44c884e988d9ebed5176a7fd1bcf1b0f8afc.tar.xz frr-06bb44c884e988d9ebed5176a7fd1bcf1b0f8afc.zip |
bgpd: Start conditional advertisement timer instantly
Do not wait for the configured timer to expire if we enable advertise-map.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_conditional_adv.c')
-rw-r--r-- | bgpd/bgp_conditional_adv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_conditional_adv.c b/bgpd/bgp_conditional_adv.c index d672cf2ab..9c2826fa1 100644 --- a/bgpd/bgp_conditional_adv.c +++ b/bgpd/bgp_conditional_adv.c @@ -315,8 +315,9 @@ void bgp_conditional_adv_enable(struct peer *peer, afi_t afi, safi_t safi) } /* Register for conditional routes polling timer */ - thread_add_timer(bm->master, bgp_conditional_adv_timer, bgp, - bgp->condition_check_period, &bgp->t_condition_check); + if (!thread_is_scheduled(bgp->t_condition_check)) + thread_add_timer(bm->master, bgp_conditional_adv_timer, bgp, 0, + &bgp->t_condition_check); } void bgp_conditional_adv_disable(struct peer *peer, afi_t afi, safi_t safi) |