diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2023-03-23 12:50:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 12:50:35 +0100 |
commit | 9cc377d4d7ccae8a318d0162c5d0d6a6754d8b0a (patch) | |
tree | 375b856b5967c883be5e043d5bef5099ec79eafb | |
parent | Merge pull request #13059 from FRRouting/dev/mgmtd (diff) | |
parent | bgpd: Do not allow setting `set distance` via route-maps to zero (diff) | |
download | frr-9cc377d4d7ccae8a318d0162c5d0d6a6754d8b0a.tar.xz frr-9cc377d4d7ccae8a318d0162c5d0d6a6754d8b0a.zip |
Merge pull request #13078 from opensourcerouting/fix/set_distance_zero
bgpd: Do not allow setting `set distance` via route-maps to zero
-rw-r--r-- | bgpd/bgp_routemap.c | 4 | ||||
-rw-r--r-- | doc/user/routemap.rst | 4 | ||||
-rw-r--r-- | yang/frr-bgp-route-map.yang | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index b7bef7512..fa9d23874 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -5512,7 +5512,7 @@ DEFUN_YANG (set_ip_nexthop_unchanged, DEFUN_YANG (set_distance, set_distance_cmd, - "set distance (0-255)", + "set distance (1-255)", SET_STR "BGP Administrative Distance to use\n" "Distance value\n") @@ -5531,7 +5531,7 @@ DEFUN_YANG (set_distance, DEFUN_YANG (no_set_distance, no_set_distance_cmd, - "no set distance [(0-255)]", + "no set distance [(1-255)]", NO_STR SET_STR "BGP Administrative Distance to use\n" "Distance value\n") diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst index c205122b0..9e4d7a611 100644 --- a/doc/user/routemap.rst +++ b/doc/user/routemap.rst @@ -294,9 +294,9 @@ Route Map Set Command Subtract the BGP local preference from an existing `local_pref`. -.. clicmd:: set distance DISTANCE +.. clicmd:: set distance (1-255) - Set the Administrative distance to DISTANCE to use for the route. + Set the Administrative distance to use for the route. This is only locally significant and will not be dispersed to peers. .. clicmd:: set weight WEIGHT diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index 90163f125..666f2bb23 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -760,7 +760,7 @@ module frr-bgp-route-map { when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:distance')"; leaf distance { type uint8 { - range "0..255"; + range "1..255"; } } } |