summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnke Chen <enchen@paloaltonetworks.com>2024-10-20 12:25:46 -0700
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-10-21 08:34:21 +0000
commit5adaa9ec7fb50abe2fd0783c67659670e2fd69d5 (patch)
tree08008b8fb4d2f560a6183d4b340ac66789a66731
parent6b3836f78efb2c51ef5518373444c3889f264320 (diff)
bgpd: allow value 0 in aigp-metric setting
The value of 0 is accepted from peers, and can also be set by the route-map "set aigp-metric igp-metric". For coonsistency, it should be allowed in "set aigp-metric <value>" as well. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com> (cherry picked from commit e07f38a43f0b176fcfb96403db71291c04f76cfb)
-rw-r--r--bgpd/bgp_routemap.c4
-rw-r--r--doc/user/routemap.rst2
2 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 63dfa86661..61586ea922 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -7136,7 +7136,7 @@ DEFUN_YANG (no_set_atomic_aggregate,
DEFPY_YANG (set_aigp_metric,
set_aigp_metric_cmd,
- "set aigp-metric <igp-metric|(1-4294967295)>$aigp_metric",
+ "set aigp-metric <igp-metric|(0-4294967295)>$aigp_metric",
SET_STR
"BGP AIGP attribute (AIGP Metric TLV)\n"
"AIGP Metric value from IGP protocol\n"
@@ -7156,7 +7156,7 @@ DEFPY_YANG (set_aigp_metric,
DEFPY_YANG (no_set_aigp_metric,
no_set_aigp_metric_cmd,
- "no set aigp-metric [<igp-metric|(1-4294967295)>]",
+ "no set aigp-metric [<igp-metric|(0-4294967295)>]",
NO_STR
SET_STR
"BGP AIGP attribute (AIGP Metric TLV)\n"
diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst
index 1d2f4e352f..fbf7b8637e 100644
--- a/doc/user/routemap.rst
+++ b/doc/user/routemap.rst
@@ -320,7 +320,7 @@ Route Map Set Command
Set the maximum meric for the route.
-.. clicmd:: set aigp-metric <igp-metric|(1-4294967295)>
+.. clicmd:: set aigp-metric <igp-metric|(0-4294967295)>
Set the BGP attribute AIGP to a specific value. If ``igp-metric`` is specified,
then the value is taken from the IGP protocol, otherwise an arbitrary value.