diff options
author | Quentin Young <qlyoung@nvidia.com> | 2021-05-14 20:57:06 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@nvidia.com> | 2021-07-13 19:19:14 +0200 |
commit | 389e4f92d67edc301994fb3b6fe9b178e6b962e4 (patch) | |
tree | 659dfef65f42bda39420cb4ad3f8a0ab1bec674a /bgpd/bgp_conditional_adv.c | |
parent | Merge pull request #8508 from opensourcerouting/systemd-no-lib (diff) | |
download | frr-389e4f92d67edc301994fb3b6fe9b178e6b962e4.tar.xz frr-389e4f92d67edc301994fb3b6fe9b178e6b962e4.zip |
bgpd: add knob to config cond-adv scanner period
Adds a knob that sets the time between loc-rib scans for conditional
advertisement.
I chose the range (5-240) because 1 second seems dumb and too easy to
hurt yourself at even moderate scale, 5 seconds you can still hurt
yourself but I could see a use case for it, and 4 minutes should be
enough for anyone (tm)
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'bgpd/bgp_conditional_adv.c')
-rw-r--r-- | bgpd/bgp_conditional_adv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_conditional_adv.c b/bgpd/bgp_conditional_adv.c index 49bc38be6..329bd3d69 100644 --- a/bgpd/bgp_conditional_adv.c +++ b/bgpd/bgp_conditional_adv.c @@ -184,7 +184,7 @@ static int bgp_conditional_adv_timer(struct thread *t) assert(bgp); thread_add_timer(bm->master, bgp_conditional_adv_timer, bgp, - CONDITIONAL_ROUTES_POLL_TIME, &bgp->t_condition_check); + bgp->condition_check_period, &bgp->t_condition_check); /* loop through each peer and advertise or withdraw routes if * advertise-map is configured and prefix(es) in condition-map @@ -315,7 +315,7 @@ 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, - CONDITIONAL_ROUTES_POLL_TIME, &bgp->t_condition_check); + bgp->condition_check_period, &bgp->t_condition_check); } void bgp_conditional_adv_disable(struct peer *peer, afi_t afi, safi_t safi) |