summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-10-12 21:06:47 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-10-26 11:26:57 +0300
commit97a52c82a569f4a2ba792fbd734f5e635a057e6f (patch)
tree83075d412d0a44d8fc2db4d2e55ec1fd405a65b6 /lib
parent91e9aee0877ca08b36f844756c6563ef175ab118 (diff)
bgpd: Implement Accumulated IGP Metric Attribute for BGP
https://www.rfc-editor.org/rfc/rfc7311.html Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/routemap.h1
-rw-r--r--lib/routemap_cli.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index c2e9de6cfb..9c78e15735 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -348,6 +348,7 @@ DECLARE_QOBJ_TYPE(route_map);
(strmatch(A, "frr-bgp-route-map:set-origin"))
#define IS_SET_ATOMIC_AGGREGATE(A) \
(strmatch(A, "frr-bgp-route-map:atomic-aggregate"))
+#define IS_SET_AIGP_METRIC(A) (strmatch(A, "frr-bgp-route-map:aigp-metric"))
#define IS_SET_ORIGINATOR_ID(A) \
(strmatch(A, "frr-bgp-route-map:originator-id"))
#define IS_SET_COMM_LIST_DEL(A) \
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c
index 6be5d15ec4..e3da29bd71 100644
--- a/lib/routemap_cli.c
+++ b/lib/routemap_cli.c
@@ -1089,6 +1089,11 @@ void route_map_action_show(struct vty *vty, const struct lyd_node *dnode,
"./rmap-set-action/frr-bgp-route-map:origin"));
} else if (IS_SET_ATOMIC_AGGREGATE(action)) {
vty_out(vty, " set atomic-aggregate\n");
+ } else if (IS_SET_AIGP_METRIC(action)) {
+ vty_out(vty, " set aigp-metric %s\n",
+ yang_dnode_get_string(
+ dnode,
+ "./rmap-set-action/frr-bgp-route-map:aigp-metric"));
} else if (IS_SET_ORIGINATOR_ID(action)) {
vty_out(vty, " set originator-id %s\n",
yang_dnode_get_string(