]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Remove BGP_UPDATE_DELAY_MIN/MAX
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 7 Aug 2024 14:39:28 +0000 (17:39 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 7 Aug 2024 14:39:28 +0000 (17:39 +0300)
Found randomly, and seems not used anymore.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h

index 828fa711b2f0842220405fa11b31d4a9604d22b4..a3180fd707b91e4e82d9d563396ecbda2adc1e81 100644 (file)
@@ -2267,9 +2267,9 @@ static int bgp_global_update_delay_config_vty(struct vty *vty,
         * Note that we only need to check this if this is the first time
         * setting the global config.
         */
-       if (bm->v_update_delay == BGP_UPDATE_DELAY_DEF) {
+       if (bm->v_update_delay == BGP_UPDATE_DELAY_DEFAULT) {
                for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
-                       if (bgp->v_update_delay != BGP_UPDATE_DELAY_DEF) {
+                       if (bgp->v_update_delay != BGP_UPDATE_DELAY_DEFAULT) {
                                vty_out(vty,
                                        "%% update-delay configuration found in vrf %s\n",
                                        bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT
@@ -2314,7 +2314,7 @@ static int bgp_global_update_delay_deconfig_vty(struct vty *vty)
        struct listnode *node, *nnode;
        struct bgp *bgp;
 
-       bm->v_update_delay = BGP_UPDATE_DELAY_DEF;
+       bm->v_update_delay = BGP_UPDATE_DELAY_DEFAULT;
        bm->v_establish_wait = bm->v_update_delay;
 
        for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
@@ -2368,7 +2368,7 @@ static int bgp_update_delay_deconfig_vty(struct vty *vty)
                        "%%Failed: bgp update-delay configured globally. Delete per-vrf not permitted\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
-       bgp->v_update_delay = BGP_UPDATE_DELAY_DEF;
+       bgp->v_update_delay = BGP_UPDATE_DELAY_DEFAULT;
        bgp->v_establish_wait = bgp->v_update_delay;
 
        return CMD_SUCCESS;
@@ -19346,7 +19346,7 @@ int bgp_config_write(struct vty *vty)
                vty_out(vty, "bgp route-map delay-timer %u\n",
                        bm->rmap_update_timer);
 
-       if (bm->v_update_delay != BGP_UPDATE_DELAY_DEF) {
+       if (bm->v_update_delay != BGP_UPDATE_DELAY_DEFAULT) {
                vty_out(vty, "bgp update-delay %d", bm->v_update_delay);
                if (bm->v_update_delay != bm->v_establish_wait)
                        vty_out(vty, " %d", bm->v_establish_wait);
index 44cd24565a966894ffdc9b3bdf0970683198895c..a88de651f50c7d8aea8cb2c9081e6a579d283aeb 100644 (file)
@@ -8432,8 +8432,8 @@ void bgp_master_init(struct event_loop *master, const int buffer_size,
        bm->start_time = monotime(NULL);
        bm->t_rmap_update = NULL;
        bm->rmap_update_timer = RMAP_DEFAULT_UPDATE_TIMER;
-       bm->v_update_delay = BGP_UPDATE_DELAY_DEF;
-       bm->v_establish_wait = BGP_UPDATE_DELAY_DEF;
+       bm->v_update_delay = BGP_UPDATE_DELAY_DEFAULT;
+       bm->v_establish_wait = BGP_UPDATE_DELAY_DEFAULT;
        bm->terminating = false;
        bm->socket_buffer = buffer_size;
        bm->wait_for_fib = false;
index b733be9f0dd82b55386e4841709713e25784aedf..626a76ba0b83d9ca63716b2a22d47d530a0f4ece 100644 (file)
@@ -489,9 +489,7 @@ struct bgp {
        uint32_t restarted_peers;
        uint32_t implicit_eors;
        uint32_t explicit_eors;
-#define BGP_UPDATE_DELAY_DEF              0
-#define BGP_UPDATE_DELAY_MIN              0
-#define BGP_UPDATE_DELAY_MAX              3600
+#define BGP_UPDATE_DELAY_DEFAULT 0
 
        /* Reference bandwidth for BGP link-bandwidth. Used when
         * the LB value has to be computed based on some other