mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 04:33:18 +00:00
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>
This commit is contained in:
parent
695c24c3b0
commit
4a5271a56b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user