summaryrefslogtreecommitdiff
path: root/pbrd/pbr_vty.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-07-08 21:39:37 -0300
committerRenato Westphal <renato@opensourcerouting.org>2018-08-13 18:59:31 -0300
commit91e5b43ab4d532cfbc38e71621c87fe98fb63130 (patch)
tree9b753eacd928b18562bf7cea592b7bc9a8c5d851 /pbrd/pbr_vty.c
parent34c462745724f4c7693a8dcc17fef70f8dac7dbb (diff)
lib, vtysh: fix inconsistent interface commands in vtysh
The definition of the interface commands in vtysh.c were outdated. Currently, all daemons that call if_cmd_init() will have the "no interface IFNAME" command and the "[no] description" commands as well, so there's no need to define exceptions for these commands anymore. To fix this, make extract.pl parse the if.c file so that vtysh can get the interface commands from there automatically. Only the "interface IFNAME [vrf NAME]" must be kept in vtysh.c because it changes the vty node and thus needs special treatment. Finally, make pimd and pbrd display interface descriptions on "sh run" when they are configured. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'pbrd/pbr_vty.c')
-rw-r--r--pbrd/pbr_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index 44e14c5477..a4b87f99d9 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -580,6 +580,9 @@ static int pbr_interface_config_write(struct vty *vty)
vty_frame(vty, "interface %s vrf %s\n",
ifp->name, vrf->name);
+ if (ifp->desc)
+ vty_out(vty, " description %s\n", ifp->desc);
+
pbr_map_write_interfaces(vty, ifp);
vty_endframe(vty, "!\n");