Skip to content

Commit

Permalink
zebra: Don't display the vrf if not using namespace based vrfs
Browse files Browse the repository at this point in the history
Currently when doing a `show ip route table XXXX`, zebra is displaying
the current default vrf as the vrf we are in.  We are displaying a
table not a vrf.  This is only true if you are not using namespace
based vrf's, so modify the output to display accordingly.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Sep 5, 2024
1 parent 7fef8d3 commit 619d5d6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions zebra/zebra_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,11 +942,17 @@ static void do_show_route_helper(struct vty *vty, struct zebra_vrf *zvrf,
if (!tableid)
vty_out(vty, "VRF %s:\n",
zvrf_name(zvrf));
else
vty_out(vty,
"VRF %s table %u:\n",
zvrf_name(zvrf),
tableid);
else {
if (vrf_is_backend_netns())
vty_out(vty,
"VRF %s table %u:\n",
zvrf_name(zvrf),
tableid);
else
vty_out(vty,
"table %u:\n",
tableid);
}
}
ctx->header_done = true;
first = 0;
Expand Down

0 comments on commit 619d5d6

Please sign in to comment.