mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 19:13:58 +00:00
ripd: fix display of the "distance" command
When displaying a configuration using the "with-defaults" option, do not display "distance 0" when the "distance" command is not configured. The range of accepted values is (1-255), so "distance 0" isn't a valid command. In this case, display "no distance". Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
25c780a32a
commit
bb5b9c10c1
@ -231,7 +231,11 @@ DEFPY (no_rip_distance,
|
|||||||
void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
|
void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
|
||||||
bool show_defaults)
|
bool show_defaults)
|
||||||
{
|
{
|
||||||
vty_out(vty, " distance %s\n", yang_dnode_get_string(dnode, NULL));
|
if (yang_dnode_is_default(dnode, NULL))
|
||||||
|
vty_out(vty, " no distance\n");
|
||||||
|
else
|
||||||
|
vty_out(vty, " distance %s\n",
|
||||||
|
yang_dnode_get_string(dnode, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user