diff options
author | paul <paul> | 2003-05-24 06:40:04 +0000 |
---|---|---|
committer | paul <paul> | 2003-05-24 06:40:04 +0000 |
commit | bfc135325e9b0768c78b51c9495eb0fbabc59db6 (patch) | |
tree | c754c2132248a7436ca8012d383a73f89fcc66ef /lib/if.c | |
parent | fd2dfce21bb21cc2f3d6de723812875ec7abc1f5 (diff) | |
download | quagga-bfc135325e9b0768c78b51c9495eb0fbabc59db6.tar.bz2 quagga-bfc135325e9b0768c78b51c9495eb0fbabc59db6.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/if.c')
-rw-r--r-- | lib/if.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |