diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-22 22:04:21 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-28 13:03:46 +0100 |
commit | 3684eb4360d4ae734cb8d37d491194a4c5d919e9 (patch) | |
tree | 117c10b1935a324ed917373cf10e3a69dd1a83b7 | |
parent | Merge pull request #5837 from qlyoung/fix-zapi-pbr-unsupported-ip-family-log-... (diff) | |
download | frr-3684eb4360d4ae734cb8d37d491194a4c5d919e9.tar.xz frr-3684eb4360d4ae734cb8d37d491194a4c5d919e9.zip |
bgpd: Allow using add/subtract for local-preference in route-maps
We already have a generic support for add/sub in route-maps. It's already
handled in route_value_compile().
Just convert to string (allow passing (-) minus sign) - works like expected.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
-rw-r--r-- | bgpd/bgp_routemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 5e6c78240..52b540273 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -4400,10 +4400,10 @@ DEFUN (no_set_distance, DEFUN (set_local_pref, set_local_pref_cmd, - "set local-preference (0-4294967295)", + "set local-preference WORD", SET_STR "BGP local preference path attribute\n" - "Preference value\n") + "Preference value (0-4294967295)\n") { int idx_number = 2; return generic_set_add(vty, VTY_GET_CONTEXT(route_map_index), @@ -4413,11 +4413,11 @@ DEFUN (set_local_pref, DEFUN (no_set_local_pref, no_set_local_pref_cmd, - "no set local-preference [(0-4294967295)]", + "no set local-preference [WORD]", NO_STR SET_STR "BGP local preference path attribute\n" - "Preference value\n") + "Preference value (0-4294967295)\n") { int idx_localpref = 3; if (argc <= idx_localpref) |