diff options
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index a38d060bd1..1f8eec9cad 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -970,9 +970,10 @@ DEFPY (show_route_table_vrf, afi_t afi = ipv4 ? AFI_IP : AFI_IP6; struct zebra_vrf *zvrf; struct route_table *t; - vrf_id_t vrf_id; + vrf_id_t vrf_id = VRF_DEFAULT; - VRF_GET_ID(vrf_id, vrf_name, !!json); + if (vrf_name) + VRF_GET_ID(vrf_id, vrf_name, !!json); zvrf = zebra_vrf_lookup_by_id(vrf_id); t = zebra_router_find_table(zvrf, table, afi, SAFI_UNICAST); |
