summaryrefslogtreecommitdiff
path: root/lib/vrf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vrf.c')
-rw-r--r--lib/vrf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index fbc45fa18c..b825ff03ff 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -851,14 +851,16 @@ static int vrf_write_host(struct vty *vty)
return 1;
}
+static int vrf_write_host(struct vty *vty);
static struct cmd_node vrf_debug_node = {
.node = VRF_DEBUG_NODE,
.prompt = "",
+ .config_write = vrf_write_host,
};
void vrf_install_commands(void)
{
- install_node(&vrf_debug_node, vrf_write_host);
+ install_node(&vrf_debug_node);
install_element(CONFIG_NODE, &vrf_debug_cmd);
install_element(ENABLE_NODE, &vrf_debug_cmd);
@@ -871,7 +873,8 @@ void vrf_cmd_init(int (*writefunc)(struct vty *vty),
{
install_element(CONFIG_NODE, &vrf_cmd);
install_element(CONFIG_NODE, &no_vrf_cmd);
- install_node(&vrf_node, writefunc);
+ vrf_node.config_write = writefunc;
+ install_node(&vrf_node);
install_default(VRF_NODE);
install_element(VRF_NODE, &vrf_exit_cmd);
if (vrf_is_backend_netns() && ns_have_netns()) {