]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: allow value 0 in aigp-metric setting
authorEnke Chen <enchen@paloaltonetworks.com>
Sun, 20 Oct 2024 19:25:46 +0000 (12:25 -0700)
committerEnke Chen <enchen@paloaltonetworks.com>
Sun, 20 Oct 2024 19:26:56 +0000 (12:26 -0700)
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>
bgpd/bgp_routemap.c
doc/user/routemap.rst

index 10428797a3132478c17b6d6eea25cbb764b782f8..8666831c7f596a6b5d14e01b5b0883f2288f76e7 100644 (file)
@@ -7255,7 +7255,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"
@@ -7275,7 +7275,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 60e458a28ae5396ff5c072a19e83b6a2ba294e40..02d674dff04a210173b71bdcb9f2edb661e0cfa4 100644 (file)
@@ -331,7 +331,7 @@ Route Map Set Command
 
    Set the maximum metric 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.