summaryrefslogtreecommitdiff
path: root/lib/routemap_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap_cli.c')
-rw-r--r--lib/routemap_cli.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c
index f64c3c2376..3e4893310e 100644
--- a/lib/routemap_cli.c
+++ b/lib/routemap_cli.c
@@ -922,13 +922,14 @@ DEFPY_YANG(
DEFPY_YANG(
set_metric, set_metric_cmd,
- "set metric <(-4294967295-4294967295)$metric|rtt$rtt|+rtt$artt|-rtt$srtt>",
+ "set metric <(-4294967295-4294967295)$metric|rtt$rtt|+rtt$artt|-rtt$srtt|igp$igp>",
SET_STR
"Metric value for destination routing protocol\n"
"Metric value (use +/- for additions or subtractions)\n"
"Assign round trip time\n"
"Add round trip time\n"
- "Subtract round trip time\n")
+ "Subtract round trip time\n"
+ "Metric value from IGP protocol\n")
{
const char *xpath = "./set-action[action='frr-route-map:set-metric']";
char xpath_value[XPATH_MAXLEN];
@@ -939,6 +940,9 @@ DEFPY_YANG(
snprintf(xpath_value, sizeof(xpath_value),
"%s/rmap-set-action/use-round-trip-time", xpath);
snprintf(value, sizeof(value), "true");
+ } else if (igp) {
+ snprintf(xpath_value, sizeof(xpath_value), "%s/rmap-set-action/use-igp", xpath);
+ snprintf(value, sizeof(value), "true");
} else if (artt) {
snprintf(xpath_value, sizeof(xpath_value),
"%s/rmap-set-action/add-round-trip-time", xpath);
@@ -1148,6 +1152,8 @@ void route_map_action_show(struct vty *vty, const struct lyd_node *dnode,
if (yang_dnode_get(dnode,
"./rmap-set-action/use-round-trip-time")) {
vty_out(vty, " set metric rtt\n");
+ } else if (yang_dnode_get(dnode, "./rmap-set-action/use-igp")) {
+ vty_out(vty, " set metric igp\n");
} else if (yang_dnode_get(
dnode,
"./rmap-set-action/add-round-trip-time")) {