diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-07-09 02:16:47 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-08-13 23:59:31 +0200 |
commit | 34c462745724f4c7693a8dcc17fef70f8dac7dbb (patch) | |
tree | b3e4f42166d66b92922fe172b34ebfd9789ef292 /lib | |
parent | zebra: fix "no pseudowire IFNAME" on vtysh (diff) | |
download | frr-34c462745724f4c7693a8dcc17fef70f8dac7dbb.tar.xz frr-34c462745724f4c7693a8dcc17fef70f8dac7dbb.zip |
lib, vtysh: fix inconsistent VRF commands in vtysh
* Only zebra and pimd call vrf_cmd_init(), so these are the only daemons
that should receive VRF commands from vtysh;
* "netns NAME" and "no netns NAME" are available only in zebra, write
custom DEFSHs in vtysh to make it aware of that;
* Remove the "no vrf NAME" definition from vtysh.c and expose the
original command to vtysh by converting the DEFUN_NOSH to a simple
DEFUN. This command doesn't change the vty node so there's no need to
special case it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vrf.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -711,12 +711,12 @@ DEFUN_NOSH (vrf, return vrf_handler_create(vty, vrfname, NULL); } -DEFUN_NOSH (no_vrf, - no_vrf_cmd, - "no vrf NAME", - NO_STR - "Delete a pseudo VRF's configuration\n" - "VRF's name\n") +DEFUN (no_vrf, + no_vrf_cmd, + "no vrf NAME", + NO_STR + "Delete a pseudo VRF's configuration\n" + "VRF's name\n") { const char *vrfname = argv[2]->arg; @@ -744,7 +744,7 @@ DEFUN_NOSH (no_vrf, struct cmd_node vrf_node = {VRF_NODE, "%s(config-vrf)# ", 1}; -DEFUN (vrf_netns, +DEFUN_NOSH (vrf_netns, vrf_netns_cmd, "netns NAME", "Attach VRF to a Namespace\n" @@ -771,7 +771,7 @@ DEFUN (vrf_netns, return ret; } -DEFUN (no_vrf_netns, +DEFUN_NOSH (no_vrf_netns, no_vrf_netns_cmd, "no netns [NAME]", NO_STR |