]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: fix vty show isis metric
authorEmanuele Di Pascale <emanuele@voltanet.io>
Fri, 20 Mar 2020 15:38:39 +0000 (16:38 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Fri, 20 Mar 2020 15:43:53 +0000 (16:43 +0100)
the vtysh command to set the isis metric on an interface
is 'isis metric level-1 X', but when showing the running
config we were displaying it as 'isis metric X level-1'.
This would confuse frr-reload.py when attempting to apply
a config file populated with the correct command; on the
other hand, using the show command format would return an
error when running vtysh -C on the file.

Fix this by making the show command return the same format
as the vtysh setting command.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd/isis_cli.c

index 3144b3c28ebafbe6720f16c2f917ee33ac46ace5..fc70a344c8d97d6ce9fd3a9d75bfe75d50b29056 100644 (file)
@@ -1398,8 +1398,8 @@ void cli_show_ip_isis_metric(struct vty *vty, struct lyd_node *dnode,
        if (strmatch(l1, l2))
                vty_out(vty, " isis metric %s\n", l1);
        else {
-               vty_out(vty, " isis metric %s level-1\n", l1);
-               vty_out(vty, " isis metric %s level-2\n", l2);
+               vty_out(vty, " isis metric level-1 %s\n", l1);
+               vty_out(vty, " isis metric level-2 %s\n", l2);
        }
 }