diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-26 13:44:33 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-31 22:49:32 +0300 |
| commit | 610af81ae4eb912981b6e0147a11aeeb654a862d (patch) | |
| tree | 5d83cb60434d982339e3bb0906826149381c618f | |
| parent | 7470509390919a5a2f69917f502feafedd65557c (diff) | |
bgpd: Remove bgp_lock() when spawning a timer for default-originate
Not sure why it's here, but looks like it was since the beginning, let's see
if we can drop it.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| -rw-r--r-- | bgpd/bgp_route.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_updgrp.c | 1 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 10 |
3 files changed, 3 insertions, 12 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 7b7a7ad207..6afecd040a 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3288,14 +3288,12 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest, if (old_select || new_select) { bgp_bump_version(dest); - if (!bgp->t_rmap_def_originate_eval) { - bgp_lock(bgp); + if (!bgp->t_rmap_def_originate_eval) event_add_timer( bm->master, update_group_refresh_default_originate_route_map, bgp, RMAP_DEFAULT_ORIGINATE_EVAL_TIMER, &bgp->t_rmap_def_originate_eval); - } } if (old_select) diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 0b1e54916a..a642be935d 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -2106,7 +2106,6 @@ void update_group_refresh_default_originate_route_map(struct event *thread) update_group_walk(bgp, update_group_default_originate_route_map_walkcb, reason); EVENT_OFF(bgp->t_rmap_def_originate_eval); - bgp_unlock(bgp); } /* diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 99c6a46e7c..d89df3d7de 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3703,11 +3703,8 @@ void bgp_instance_down(struct bgp *bgp) struct listnode *next; /* Stop timers. */ - if (bgp->t_rmap_def_originate_eval) { + if (bgp->t_rmap_def_originate_eval) EVENT_OFF(bgp->t_rmap_def_originate_eval); - bgp_unlock(bgp); /* TODO - This timer is started with a lock - - why? */ - } /* Bring down peers, so corresponding routes are purged. */ for (ALL_LIST_ELEMENTS(bgp->peer, node, next, peer)) { @@ -3810,11 +3807,8 @@ int bgp_delete(struct bgp *bgp) vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP6); /* Stop timers. */ - if (bgp->t_rmap_def_originate_eval) { + if (bgp->t_rmap_def_originate_eval) EVENT_OFF(bgp->t_rmap_def_originate_eval); - bgp_unlock(bgp); /* TODO - This timer is started with a lock - - why? */ - } /* Inform peers we're going down. */ for (ALL_LIST_ELEMENTS(bgp->peer, node, next, peer)) |
