From 3b225ee79965aeb0b3832ccd6c6b991d1c754023 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 3 Aug 2021 14:25:01 +0300 Subject: [PATCH] bgpd: Don't set `non-transitive` for extcommunity bandwidth by default Before: ``` ~/frr# vtysh -c 'conf' -c 'route-map testas permit 10' -c 'set extcommunity bandwidth 321' ~/frr# vtysh -c 'show route-map testas' | grep 321 extcommunity bandwidth 321 non-transitive ~/frr# vtysh -c 'show run' | grep 321 set extcommunity bandwidth 321 non-transitive ``` After: ``` ~/frr# vtysh -c 'conf' -c 'route-map testas permit 10' -c 'set extcommunity bandwidth 321' ~/frr# vtysh -c 'show route-map testas' | grep 321 extcommunity bandwidth 321 ~/frr# vtysh -c 'show run' | grep 321 set extcommunity bandwidth 321 ~/frr# vtysh -c 'conf' -c 'route-map testas permit 20' -c 'set extcommunity bandwidth 321 non-tra' ~/frr# vtysh -c 'show run' | grep 321 set extcommunity bandwidth 321 set extcommunity bandwidth 321 non-transitive ``` Signed-off-by: Donatas Abraitis --- bgpd/bgp_routemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 09dd71c020..2ab68361e2 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -5751,7 +5751,7 @@ DEFUN_YANG (set_ecommunity_lb, "Attribute is set as non-transitive\n") { int idx_lb = 3; - int idx_non_transitive = 4; + int idx_non_transitive = 0; const char *xpath = "./set-action[action='frr-bgp-route-map:set-extcommunity-lb']"; char xpath_lb_type[XPATH_MAXLEN]; @@ -5783,7 +5783,7 @@ DEFUN_YANG (set_ecommunity_lb, argv[idx_lb]->arg); } - if (argv[idx_non_transitive]) + if (argv_find(argv, argc, "non-transitive", &idx_non_transitive)) nb_cli_enqueue_change(vty, xpath_non_transitive, NB_OP_MODIFY, "true"); else -- 2.39.5