diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-07-29 20:34:56 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-07-29 20:35:25 +0200 |
commit | 9da01b0b7b6bc9a5cc129f850ff4f459ec33eb49 (patch) | |
tree | 05933a71eadb8313ace4088f2cce576f43fc1a1a /eigrpd | |
parent | Merge pull request #9222 from ton31337/fix/bgp_dampening_clear (diff) | |
download | frr-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 'eigrpd')
-rw-r--r-- | eigrpd/eigrp_cli.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/eigrpd/eigrp_cli.c b/eigrpd/eigrp_cli.c index 47de929fc..35536979e 100644 --- a/eigrpd/eigrp_cli.c +++ b/eigrpd/eigrp_cli.c @@ -861,16 +861,6 @@ static int eigrp_config_write(struct vty *vty) return written; } -static int eigrp_write_interface(struct vty *vty); -static struct cmd_node eigrp_interface_node = { - .name = "interface", - .node = INTERFACE_NODE, - .parent_node = CONFIG_NODE, - .prompt = "%s(config-if)# ", - .config_write = eigrp_write_interface, -}; - - static int eigrp_write_interface(struct vty *vty) { struct lyd_node *dnode; @@ -921,8 +911,7 @@ eigrp_cli_init(void) vrf_cmd_init(NULL, &eigrpd_privs); - install_node(&eigrp_interface_node); - if_cmd_init(); + if_cmd_init(eigrp_write_interface); install_element(INTERFACE_NODE, &eigrp_if_delay_cmd); install_element(INTERFACE_NODE, &no_eigrp_if_delay_cmd); |