From bfc135325e9b0768c78b51c9495eb0fbabc59db6 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 24 May 2003 06:40:04 +0000 Subject: From: Hasso Tepper ensure only interfaces that are inactive or do not exist can be deleted --- lib/if.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/if.c b/lib/if.c index 2ca8c94b..f003754a 100644 --- a/lib/if.c +++ b/lib/if.c @@ -453,9 +453,13 @@ DEFUN_NOSH (no_interface, ifp = if_lookup_by_name (argv[0]); if (ifp == NULL) - return CMD_SUCCESS; + { + vty_out (vty, "%% Inteface %s does not exist%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } - if (if_is_up(ifp)) { + if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE)) + { vty_out (vty, "%% Only inactive interfaces can be deleted%s", VTY_NEWLINE); return CMD_WARNING; -- cgit v1.2.1