summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpaul <paul>2003-05-24 06:40:04 +0000
committerpaul <paul>2003-05-24 06:40:04 +0000
commitf08c098245009fc86e4f26640f326280561b3801 (patch)
tree32568c4daed30ba8a5e56d2ea6c32d7f8c46b4c4 /lib
parent5b27acfdfab084851901fedd490b4c3b333b69f8 (diff)
downloadquagga-f08c098245009fc86e4f26640f326280561b3801.tar.bz2
quagga-f08c098245009fc86e4f26640f326280561b3801.tar.xz
From: Hasso Tepper <hasso@estpak.ee>
ensure only interfaces that are inactive or do not exist can be deleted
Diffstat (limited to 'lib')
-rw-r--r--lib/if.c8
1 files changed, 6 insertions, 2 deletions
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;