summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2021-01-07 14:46:59 +0100
committerEmanuele Di Pascale <emanuele@voltanet.io>2021-01-11 10:15:18 +0100
commit174c5be33c433b9cc586d3aeee178407d282d97f (patch)
treef974d1cf0ef5bf4fd60f44044354d1f6d6514501 /bgpd
parenttools: fix pce-config removal (diff)
downloadfrr-174c5be33c433b9cc586d3aeee178407d282d97f.tar.xz
frr-174c5be33c433b9cc586d3aeee178407d282d97f.zip
bgpd: fix unsetting of multipath as-set
in the nortbound callback for the boolean leaf multi-path-as-set, the actual value of the leaf was being ignored. As a result, going from as-set to no-as-set was having no effect. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_nb_config.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c
index bee963329..eb2f70fff 100644
--- a/bgpd/bgp_nb_config.c
+++ b/bgpd/bgp_nb_config.c
@@ -894,6 +894,9 @@ 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);
@@ -923,15 +926,10 @@ 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 (!CHECK_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET)) {
+ if (yang_dnode_get_bool(args->dnode, NULL))
SET_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__);
-
+ else
+ UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
break;
}