Merge pull request #15278 from idryzhov/fix-no-vrf

lib: fix "no vrf" command
This commit is contained in:
Donatas Abraitis 2024-02-02 15:23:49 +02:00 committed by GitHub
commit 4650d5aa5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -681,18 +681,6 @@ DEFUN_YANG (no_vrf,
const char *vrfname = argv[2]->arg; const char *vrfname = argv[2]->arg;
char xpath_list[XPATH_MAXLEN]; char xpath_list[XPATH_MAXLEN];
struct vrf *vrfp;
vrfp = vrf_lookup_by_name(vrfname);
if (vrfp == NULL)
return CMD_SUCCESS;
if (CHECK_FLAG(vrfp->status, VRF_ACTIVE)) {
vty_out(vty, "%% Only inactive VRFs can be deleted\n");
return CMD_WARNING_CONFIG_FAILED;
}
if (vrf_get_backend() == VRF_BACKEND_VRF_LITE) { if (vrf_get_backend() == VRF_BACKEND_VRF_LITE) {
/* /*
* Remove the VRF interface config when removing the VRF. * Remove the VRF interface config when removing the VRF.