From d0c2fca84002dfab9ea3c0168c02637c8a3a1f4f Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Fri, 14 May 2021 01:42:38 +0300 Subject: [PATCH] Revert "bgpd: fix unsetting of multipath as-set" This reverts commit 174c5be33c433b9cc586d3aeee178407d282d97f. --- bgpd/bgp_nb_config.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c index 8022e031d3..e871831771 100644 --- a/bgpd/bgp_nb_config.c +++ b/bgpd/bgp_nb_config.c @@ -893,9 +893,6 @@ int bgp_global_route_selection_options_allow_multiple_as_modify( "../multi-path-as-set")) { SET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET); - } else { - UNSET_FLAG(bgp->flags, - BGP_FLAG_MULTIPATH_RELAX_AS_SET); } } else { UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX); @@ -925,10 +922,15 @@ int bgp_global_route_selection_options_multi_path_as_set_modify( return NB_OK; case NB_EV_APPLY: bgp = nb_running_get_entry(args->dnode, NULL, true); - if (yang_dnode_get_bool(args->dnode, NULL)) + + if (!CHECK_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET)) { SET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET); - else - UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET); + + } else + zlog_debug( + "%s multi-path-as-set as part of allow-multiple-as modify cb.", + __func__); + break; } -- 2.39.5