summaryrefslogtreecommitdiffstats
path: root/ospfd
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 /ospfd
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 'ospfd')
-rw-r--r--ospfd/ospf_vty.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 3819478cf..a888f2eb9 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -12622,22 +12622,11 @@ void ospf_vty_show_init(void)
install_element(VIEW_NODE, &show_ip_ospf_external_aggregator_cmd);
}
-static int config_write_interface(struct vty *vty);
-/* ospfd's interface node. */
-static struct cmd_node interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = config_write_interface,
-};
-
/* Initialization of OSPF interface. */
static void ospf_vty_if_init(void)
{
/* Install interface node. */
- install_node(&interface_node);
- if_cmd_init();
+ if_cmd_init(config_write_interface);
/* "ip ospf authentication" commands. */
install_element(INTERFACE_NODE, &ip_ospf_authentication_args_addr_cmd);