From 4a5271a56ba8991224e94b2c5877a40d10241fcb Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Wed, 13 Apr 2022 04:51:38 -0400 Subject: bgpd: fix wrong check for default VRF Currently the warning is wrong: ``` root#show bgp vrf default vni BGP instance for VRF default not foundACC1(config)# ``` Two changes for "show bgp vrf VRFNAME vni [json]": - Correct the default VRF check - Add newline for warning Signed-off-by: anlan_cs --- bgpd/bgp_evpn_vty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bgpd/bgp_evpn_vty.c') diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 5f519e84e..62459a03f 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -5747,9 +5747,13 @@ DEFUN (show_bgp_vrf_l3vni_info, name = argv[idx_vrf]->arg; bgp = bgp_lookup_by_name(name); + if (strmatch(name, VRF_DEFAULT_NAME)) + bgp = bgp_get_default(); + if (!bgp) { if (!uj) - vty_out(vty, "BGP instance for VRF %s not found", name); + vty_out(vty, "BGP instance for VRF %s not found\n", + name); else { json_object_string_add(json, "warning", "BGP instance not found"); -- cgit v1.2.3