summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-02-25 17:59:28 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:36 -0400
commit8b5bdc8bdfdb95d5e22ccb8733dbd35c84f3f79d (patch)
treedf4259f0aa0f915330f7199c2d9e395d88dcda52 /zebra/zebra_vty.c
parent98fd05580ce702cae1dc403dfd45ae18a6df87cd (diff)
zebra: Remove afi field in nexthop hash entry
I do not believe we should be hashing based on AFI in for our upper level nexthop group entries. These should be ambiguous with regards to address families since an ipv4 or ipv6 address can have the same interface nexthop. This can be seen in NEXTHOP_TYPE_IFINDEX. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 32375e0a00..b0b888381c 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1103,7 +1103,7 @@ DEFUN (ip_nht_default_route,
}
static void show_nexthop_group_cmd_helper(struct vty *vty,
- struct zebra_vrf *zvrf, afi_t afi)
+ struct zebra_vrf *zvrf)
{
struct list *list = hash_to_list(zrouter.nhgs);
struct nhg_hash_entry *nhe;
@@ -1112,15 +1112,12 @@ static void show_nexthop_group_cmd_helper(struct vty *vty,
for (ALL_LIST_ELEMENTS_RO(list, node, nhe)) {
struct nexthop *nhop;
- if (nhe->afi != afi)
- continue;
-
if (nhe->vrf_id != zvrf->vrf->vrf_id)
continue;
vty_out(vty,
- "Group: %u RefCnt: %u afi: %d Valid: %d Installed: %d\n",
- nhe->dplane_ref, nhe->refcnt, nhe->afi,
+ "Group: %u ID: %u RefCnt: %d Valid: %d Installed: %d\n",
+ nhe->dplane_ref, nhe->id, nhe->refcnt,
nhe->flags & NEXTHOP_GROUP_VALID,
nhe->flags & NEXTHOP_GROUP_INSTALLED);
@@ -1135,14 +1132,11 @@ static void show_nexthop_group_cmd_helper(struct vty *vty,
DEFPY (show_nexthop_group,
show_nexthop_group_cmd,
- "show nexthop-group <ipv4$v4|ipv6$v6> [vrf <NAME$vrf_name|all$vrf_all>]",
+ "show nexthop-group [vrf <NAME$vrf_name|all$vrf_all>]",
SHOW_STR
- IP_STR
- IP6_STR
"Show Nexthop Groups\n"
VRF_FULL_CMD_HELP_STR)
{
- afi_t afi = v4 ? AFI_IP : AFI_IP6;
struct zebra_vrf *zvrf;
if (vrf_all) {
@@ -1156,7 +1150,7 @@ DEFPY (show_nexthop_group,
continue;
vty_out(vty, "VRF: %s\n", vrf->name);
- show_nexthop_group_cmd_helper(vty, zvrf, afi);
+ show_nexthop_group_cmd_helper(vty, zvrf);
}
return CMD_SUCCESS;
@@ -1172,7 +1166,7 @@ DEFPY (show_nexthop_group,
return CMD_SUCCESS;
}
- show_nexthop_group_cmd_helper(vty, zvrf, afi);
+ show_nexthop_group_cmd_helper(vty, zvrf);
return CMD_SUCCESS;
}