From c10cdcd79aa02ee17b1d701c16ce07285c37a178 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 29 Aug 2024 14:49:36 -0400 Subject: [PATCH] zebra: Display afi of the nexthop hash entry Let's display the afi of the nexthop hash entry. Right now it is impossible to tell the difference between v4 or v6 nexthops, especially since it is important for the kernel. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 3b786e3257..91aa4e400b 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1195,6 +1195,7 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe, json_object_string_add(json, "uptime", up_str); json_object_string_add(json, "vrf", vrf_id_to_name(nhe->vrf_id)); + json_object_string_add(json, "afi", afi2str(nhe->afi)); } else { vty_out(vty, "ID: %u (%s)\n", nhe->id, @@ -1208,7 +1209,8 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe, vty_out(vty, "\n"); vty_out(vty, " Uptime: %s\n", up_str); - vty_out(vty, " VRF: %s\n", vrf_id_to_name(nhe->vrf_id)); + vty_out(vty, " VRF: %s(%s)\n", vrf_id_to_name(nhe->vrf_id), + afi2str(nhe->afi)); } if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_VALID)) { -- 2.39.5