From e8d7d45685aac0e2ec32a1b0841d1d95a7ee758c Mon Sep 17 00:00:00 2001 From: Enke Chen Date: Sun, 20 Oct 2024 12:25:46 -0700 Subject: [PATCH] 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 " as well. Signed-off-by: Enke Chen (cherry picked from commit e07f38a43f0b176fcfb96403db71291c04f76cfb) --- bgpd/bgp_routemap.c | 4 ++-- doc/user/routemap.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 9c5308e7756e..ac44b57813e1 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -6604,7 +6604,7 @@ DEFUN_YANG (no_set_atomic_aggregate, DEFPY_YANG (set_aigp_metric, set_aigp_metric_cmd, - "set aigp-metric $aigp_metric", + "set aigp-metric $aigp_metric", SET_STR "BGP AIGP attribute (AIGP Metric TLV)\n" "AIGP Metric value from IGP protocol\n" @@ -6624,7 +6624,7 @@ DEFPY_YANG (set_aigp_metric, DEFPY_YANG (no_set_aigp_metric, no_set_aigp_metric_cmd, - "no set aigp-metric []", + "no set aigp-metric []", NO_STR SET_STR "BGP AIGP attribute (AIGP Metric TLV)\n" diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst index bd19ae88e230..56fee305c0a1 100644 --- a/doc/user/routemap.rst +++ b/doc/user/routemap.rst @@ -318,7 +318,7 @@ Route Map Set Command Set the maximum meric for the route. -.. clicmd:: set aigp-metric +.. clicmd:: set aigp-metric 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.