mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 13:31:48 +00:00
eigrpd: Make show ip eigrp vrf all interfaces
work correctly
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
10b3a32521
commit
b1d26a4003
@ -212,27 +212,12 @@ DEFPY (show_ip_eigrp_topology,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFPY (show_ip_eigrp_interfaces,
|
||||
show_ip_eigrp_interfaces_cmd,
|
||||
"show ip eigrp [vrf NAME] interfaces [IFNAME] [detail]$detail",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
"IP-EIGRP show commands\n"
|
||||
VRF_CMD_HELP_STR
|
||||
"IP-EIGRP interfaces\n"
|
||||
"Interface name to look at\n"
|
||||
"Detailed information\n")
|
||||
static void eigrp_interface_helper(struct vty *vty, struct eigrp *eigrp,
|
||||
const char *ifname, const char *detail)
|
||||
{
|
||||
struct eigrp_interface *ei;
|
||||
struct eigrp *eigrp;
|
||||
struct listnode *node;
|
||||
|
||||
eigrp = eigrp_vty_get_eigrp(vty, vrf);
|
||||
if (eigrp == NULL) {
|
||||
vty_out(vty, "EIGRP Routing Process not enabled\n");
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
if (!ifname)
|
||||
show_ip_eigrp_interface_header(vty, eigrp);
|
||||
|
||||
@ -243,6 +228,43 @@ DEFPY (show_ip_eigrp_interfaces,
|
||||
show_ip_eigrp_interface_detail(vty, eigrp, ei);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DEFPY (show_ip_eigrp_interfaces,
|
||||
show_ip_eigrp_interfaces_cmd,
|
||||
"show ip eigrp [vrf NAME] interfaces [IFNAME] [detail]$detail",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
"IP-EIGRP show commands\n"
|
||||
VRF_CMD_HELP_STR
|
||||
"IP-EIGRP interfaces\n"
|
||||
"Interface name to look at\n"
|
||||
"Detailed information\n")
|
||||
{
|
||||
struct eigrp *eigrp;
|
||||
|
||||
if (vrf && strncmp(vrf, "all", sizeof("all")) == 0) {
|
||||
struct vrf *vrf;
|
||||
|
||||
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
|
||||
eigrp = eigrp_lookup(vrf->vrf_id);
|
||||
if (!eigrp)
|
||||
continue;
|
||||
|
||||
vty_out(vty, "VRF %s:\n", vrf->name);
|
||||
|
||||
eigrp_interface_helper(vty, eigrp, ifname, detail);
|
||||
}
|
||||
} else {
|
||||
eigrp = eigrp_vty_get_eigrp(vty, vrf);
|
||||
if (eigrp == NULL) {
|
||||
vty_out(vty, "EIGRP Routing Process not enabled\n");
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
eigrp_interface_helper(vty, eigrp, ifname, detail);
|
||||
}
|
||||
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user