From: Donatas Abraitis Date: Tue, 3 Aug 2021 11:25:01 +0000 (+0300) Subject: bgpd: Don't set `non-transitive` for extcommunity bandwidth by default X-Git-Tag: base_8.1~196^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3b225ee79965aeb0b3832ccd6c6b991d1c754023;p=matthieu%2Ffrr.git 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 --- 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