diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-07-29 21:34:56 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-07-29 21:35:25 +0300 |
| commit | 9da01b0b7b6bc9a5cc129f850ff4f459ec33eb49 (patch) | |
| tree | 05933a71eadb8313ace4088f2cce576f43fc1a1a /pbrd/pbr_vty.c | |
| parent | 7543016dbc01093d5fbc7e94bbc9bc24344b3efc (diff) | |
*: 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 'pbrd/pbr_vty.c')
| -rw-r--r-- | pbrd/pbr_vty.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index 730f965cd0..2936d1e346 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -1100,15 +1100,6 @@ DEFUN_NOSH(show_debugging_pbr, /* ------------------------------------------------------------------------- */ -static int pbr_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 = pbr_interface_config_write, -}; - static int pbr_interface_config_write(struct vty *vty) { struct interface *ifp; @@ -1240,8 +1231,7 @@ void pbr_vty_init(void) vrf_cmd_init(NULL, &pbr_privs); - install_node(&interface_node); - if_cmd_init(); + if_cmd_init(pbr_interface_config_write); install_node(&pbr_map_node); |
