summaryrefslogtreecommitdiff
path: root/lib/vrf.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2020-07-21 11:48:34 -0400
committerGitHub <noreply@github.com>2020-07-21 11:48:34 -0400
commit807b4540435229eba6e2fc88fa6f80f88e9269f1 (patch)
tree625bf01ba2f88e3e82db96d190742d78880ebfb9 /lib/vrf.c
parenta5d68ac07a7b7a7084f80d65472c775a9692135b (diff)
parentcd980d0375a45dc885a1781d00a6654e58f4396b (diff)
Merge pull request #6435 from idryzhov/fix-no-vrf
vtysh: return success from "no vrf" when VRF doesn't exist
Diffstat (limited to 'lib/vrf.c')
-rw-r--r--lib/vrf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index a9ea632ac5..a7a10451bf 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -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");