summaryrefslogtreecommitdiffstats
path: root/lib/if.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-07-09 02:39:37 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-08-13 23:59:31 +0200
commit91e5b43ab4d532cfbc38e71621c87fe98fb63130 (patch)
tree9b753eacd928b18562bf7cea592b7bc9a8c5d851 /lib/if.c
parentlib, vtysh: fix inconsistent VRF commands in vtysh (diff)
downloadfrr-91e5b43ab4d532cfbc38e71621c87fe98fb63130.tar.xz
frr-91e5b43ab4d532cfbc38e71621c87fe98fb63130.zip
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 'lib/if.c')
-rw-r--r--lib/if.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/if.c b/lib/if.c
index e31ccd856..dd7d21038 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -626,7 +626,7 @@ static struct interface *if_sunwzebra_get(char *name, vrf_id_t vrf_id)
}
#endif /* SUNOS_5 */
-DEFUN (interface,
+DEFUN_NOSH (interface,
interface_cmd,
"interface IFNAME [vrf NAME]",
"Select an interface to configure\n"
@@ -669,13 +669,13 @@ DEFUN (interface,
return CMD_SUCCESS;
}
-DEFUN_NOSH (no_interface,
- no_interface_cmd,
- "no interface IFNAME [vrf NAME]",
- NO_STR
- "Delete a pseudo interface's configuration\n"
- "Interface's name\n"
- VRF_CMD_HELP_STR)
+DEFUN (no_interface,
+ no_interface_cmd,
+ "no interface IFNAME [vrf NAME]",
+ NO_STR
+ "Delete a pseudo interface's configuration\n"
+ "Interface's name\n"
+ VRF_CMD_HELP_STR)
{
int idx_vrf = 4;
const char *ifname = argv[2]->arg;