diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-13 17:30:06 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-25 14:31:07 +0200 |
commit | 104fd767383a042baff0eff8f3988d3a95123eda (patch) | |
tree | 0d37d85d14d727078fb4fdfecf4a677ad5e37b4e /eigrpd | |
parent | Merge pull request #9824 from idryzhov/nb-cli-const-lyd-node (diff) | |
download | frr-104fd767383a042baff0eff8f3988d3a95123eda.tar.xz frr-104fd767383a042baff0eff8f3988d3a95123eda.zip |
*: fix interface config write in NB-converted daemons
When writing the config from the NB-converted daemon, we must not rely
on the operational data. This commit changes the output of the interface
configuration to use only config data. As the code is the same for all
daemons, move it to the lib and remove all the duplicated code.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'eigrpd')
-rw-r--r-- | eigrpd/eigrp_cli.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/eigrpd/eigrp_cli.c b/eigrpd/eigrp_cli.c index 329332f69..744f5f9c7 100644 --- a/eigrpd/eigrp_cli.c +++ b/eigrpd/eigrp_cli.c @@ -869,30 +869,6 @@ static int eigrp_config_write(struct vty *vty) return written; } -static int eigrp_write_interface(struct vty *vty) -{ - const struct lyd_node *dnode; - struct interface *ifp; - struct vrf *vrf; - int written = 0; - - RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) { - FOR_ALL_INTERFACES(vrf, ifp) { - dnode = yang_dnode_getf( - running_config->dnode, - "/frr-interface:lib/interface[name='%s'][vrf='%s']", - ifp->name, vrf->name); - if (dnode == NULL) - continue; - - written = 1; - nb_cli_show_dnode_cmds(vty, dnode, false); - } - } - - return written; -} - void eigrp_cli_init(void) { @@ -919,7 +895,7 @@ eigrp_cli_init(void) vrf_cmd_init(NULL); - if_cmd_init(eigrp_write_interface); + if_cmd_init_default(); install_element(INTERFACE_NODE, &eigrp_if_delay_cmd); install_element(INTERFACE_NODE, &no_eigrp_if_delay_cmd); |