Skip to content

Commit

Permalink
lib: fix "no vrf" command
Browse files Browse the repository at this point in the history
Remove operational data check from CLI command. It never works in mgmtd
and it is not needed in backend daemons because it's done in
`lib_vrf_destroy` callback.

Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Feb 1, 2024
1 parent 9d8fd14 commit 7566291
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 7566291

Please sign in to comment.