summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp_vty.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-07-29 20:34:56 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-07-29 20:35:25 +0200
commit9da01b0b7b6bc9a5cc129f850ff4f459ec33eb49 (patch)
tree05933a71eadb8313ace4088f2cce576f43fc1a1a /vrrpd/vrrp_vty.c
parentMerge pull request #9222 from ton31337/fix/bgp_dampening_clear (diff)
downloadfrr-9da01b0b7b6bc9a5cc129f850ff4f459ec33eb49.tar.xz
frr-9da01b0b7b6bc9a5cc129f850ff4f459ec33eb49.zip
*: cleanup interface node installation
The only difference in daemons' interface node definition is the config write function. No need to define the node in every daemon, just pass the callback as an argument to a library function and define the node there. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'vrrpd/vrrp_vty.c')
-rw-r--r--vrrpd/vrrp_vty.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c
index 7af9148a8..1904e936c 100644
--- a/vrrpd/vrrp_vty.c
+++ b/vrrpd/vrrp_vty.c
@@ -744,14 +744,6 @@ static int vrrp_config_write_interface(struct vty *vty)
return write;
}
-static struct cmd_node interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = vrrp_config_write_interface,
-};
-
static struct cmd_node debug_node = {
.name = "debug",
.node = DEBUG_NODE,
@@ -769,10 +761,9 @@ static struct cmd_node vrrp_node = {
void vrrp_vty_init(void)
{
install_node(&debug_node);
- install_node(&interface_node);
install_node(&vrrp_node);
vrf_cmd_init(NULL, &vrrp_privs);
- if_cmd_init();
+ if_cmd_init(vrrp_config_write_interface);
install_element(VIEW_NODE, &vrrp_vrid_show_cmd);
install_element(VIEW_NODE, &vrrp_vrid_show_summary_cmd);