]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: allow value 0 in aigp-metric setting 17176/head
authorEnke Chen <enchen@paloaltonetworks.com>
Sun, 20 Oct 2024 19:25:46 +0000 (12:25 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Mon, 21 Oct 2024 08:34:30 +0000 (08:34 +0000)
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)

bgpd/bgp_routemap.c
doc/user/routemap.rst

index fcc2178dcad745153205297a0689b89aa5087b7f..aab04cb277ed1c8e781f675061e3f6c4ab7bfc5b 100644 (file)
@@ -7140,7 +7140,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"
@@ -7160,7 +7160,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"
index 1d2f4e352f38dc364568066e840df87d14155f5a..fbf7b8637e6af8dd383767edc8019e840b922e51 100644 (file)
@@ -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.