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

vtysh: return success from "no vrf" when VRF doesn't exist
This commit is contained in:
Quentin Young 2020-07-21 11:48:34 -04:00 committed by GitHub
commit 807b454043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -757,10 +757,8 @@ DEFUN (no_vrf,
vrfp = vrf_lookup_by_name(vrfname);
if (vrfp == NULL) {
vty_out(vty, "%% VRF %s does not exist\n", vrfname);
return CMD_WARNING_CONFIG_FAILED;
}
if (vrfp == NULL)
return CMD_SUCCESS;
if (CHECK_FLAG(vrfp->status, VRF_ACTIVE)) {
vty_out(vty, "%% Only inactive VRFs can be deleted\n");