Skip to content

Commit

Permalink
Merge pull request #15278 from idryzhov/fix-no-vrf
Browse files Browse the repository at this point in the history
lib: fix "no vrf" command
  • Loading branch information
ton31337 authored Feb 2, 2024
2 parents 4ec8522 + 7566291 commit 4650d5a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/vrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,18 +681,6 @@ DEFUN_YANG (no_vrf,
const char *vrfname = argv[2]->arg;
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) {
/*
* Remove the VRF interface config when removing the VRF.
Expand Down

0 comments on commit 4650d5a

Please sign in to comment.