Merge pull request #9561 from idryzhov/bgp-no-router-vrf-default

bgpd: fix "no router bgp X vrf default"
This commit is contained in:
Donatas Abraitis 2021-09-06 12:41:20 +03:00 committed by GitHub
commit 53ca9cc9d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1387,8 +1387,12 @@ DEFUN (no_router_bgp,
} else {
as = strtoul(argv[idx_asn]->arg, NULL, 10);
if (argc > 4)
if (argc > 4) {
name = argv[idx_vrf]->arg;
if (strmatch(argv[idx_vrf - 1]->text, "vrf")
&& strmatch(name, VRF_DEFAULT_NAME))
name = NULL;
}
/* Lookup bgp structure. */
bgp = bgp_lookup(as, name);