]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Remove bgp_lock() when spawning a timer for default-originate
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 26 May 2023 10:44:33 +0000 (13:44 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 31 May 2023 19:49:32 +0000 (22:49 +0300)
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>
bgpd/bgp_route.c
bgpd/bgp_updgrp.c
bgpd/bgpd.c

index 7b7a7ad207a4379dbece9249dd2e7345089aad2b..6afecd040a362e046772d7958f30bd1b81afbab1 100644 (file)
@@ -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)
index 0b1e54916a7892e204010f878725f47a025cbbc6..a642be935d3b6eda5887987ef2385d56b33a4359 100644 (file)
@@ -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);
 }
 
 /*
index 99c6a46e7cd205b9cba5aa7ef2b0e5facbfdd32c..d89df3d7dea6276e84c420ae56a8cbcde19792f2 100644 (file)
@@ -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))