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 /ripd | |
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 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 7a8e10f30..a2c86e3b2 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1156,15 +1156,6 @@ int rip_show_network_config(struct vty *vty, struct rip *rip) return 0; } -static int rip_interface_config_write(struct vty *vty); -static struct cmd_node interface_node = { - .name = "interface", - .node = INTERFACE_NODE, - .parent_node = CONFIG_NODE, - .prompt = "%s(config-if)# ", - .config_write = rip_interface_config_write, -}; - void rip_interface_sync(struct interface *ifp) { struct vrf *vrf; @@ -1204,8 +1195,7 @@ void rip_if_init(void) hook_register_prio(if_del, 0, rip_interface_delete_hook); /* Install interface node. */ - install_node(&interface_node); - if_cmd_init(); + if_cmd_init(rip_interface_config_write); if_zapi_callbacks(rip_ifp_create, rip_ifp_up, rip_ifp_down, rip_ifp_destroy); } |