summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2022-04-13 10:51:38 +0200
committeranlan_cs <vic.lan@pica8.com>2022-04-13 11:00:33 +0200
commit4a5271a56ba8991224e94b2c5877a40d10241fcb (patch)
tree19d97d613c90e1cb4cbd061bb1380b1db50fa5d0 /bgpd
parentMerge pull request #10994 from opensourcerouting/fix/autocomplete_for_adverti... (diff)
downloadfrr-4a5271a56ba8991224e94b2c5877a40d10241fcb.tar.xz
frr-4a5271a56ba8991224e94b2c5877a40d10241fcb.zip
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 <vic.lan@pica8.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_evpn_vty.c6
1 files changed, 5 insertions, 1 deletions
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");