diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-13 02:09:34 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-16 17:45:06 +0300 |
| commit | 7f9c68df53a276969e7b68273c9fe7be6c005abd (patch) | |
| tree | ada0566bb2230697d78281fec1e88149e57f5cf5 /eigrpd | |
| parent | 77a42534c1829b0e7ad4993585c4be58f756df48 (diff) | |
eigrpd: fix dependency on operational state in cli
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'eigrpd')
| -rw-r--r-- | eigrpd/eigrp_cli.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/eigrpd/eigrp_cli.c b/eigrpd/eigrp_cli.c index 0de72d1ac8..ae15e97d4a 100644 --- a/eigrpd/eigrp_cli.c +++ b/eigrpd/eigrp_cli.c @@ -703,12 +703,12 @@ DEFPY_YANG( void eigrp_cli_show_summarize_address(struct vty *vty, struct lyd_node *dnode, bool show_defaults) { - const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL, - true); + const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance"); + uint16_t asn = yang_dnode_get_uint16(instance, "./asn"); const char *summarize_address = yang_dnode_get_string(dnode, NULL); - vty_out(vty, " ip summary-address eigrp %d %s\n", - eif->eigrp->AS, summarize_address); + vty_out(vty, " ip summary-address eigrp %d %s\n", asn, + summarize_address); } /* @@ -767,12 +767,11 @@ DEFPY_YANG( void eigrp_cli_show_authentication(struct vty *vty, struct lyd_node *dnode, bool show_defaults) { - const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL, - true); + const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance"); + uint16_t asn = yang_dnode_get_uint16(instance, "./asn"); const char *crypt = yang_dnode_get_string(dnode, NULL); - vty_out(vty, " ip authentication mode eigrp %d %s\n", - eif->eigrp->AS, crypt); + vty_out(vty, " ip authentication mode eigrp %d %s\n", asn, crypt); } /* @@ -827,12 +826,12 @@ DEFPY_YANG( void eigrp_cli_show_keychain(struct vty *vty, struct lyd_node *dnode, bool show_defaults) { - const struct eigrp_interface *eif = nb_running_get_entry(dnode, NULL, - true); + const struct lyd_node *instance = yang_dnode_get_parent(dnode, "instance"); + uint16_t asn = yang_dnode_get_uint16(instance, "./asn"); const char *keychain = yang_dnode_get_string(dnode, NULL); - vty_out(vty, " ip authentication key-chain eigrp %d %s\n", - eif->eigrp->AS, keychain); + vty_out(vty, " ip authentication key-chain eigrp %d %s\n", asn, + keychain); } |
