aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2018-08-10 14:10:22 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2018-08-10 14:10:22 +0000
commitf4d5e7d8b534fc331ac4680fe09a3b43fa9a5191 (patch)
tree51caf2a6833a4adb24be6ab676e330fe51e93732 /sbin/ipfw
parent84c956df7772b5e2c4dd121f46535b0889b13bee (diff)
downloadsrc-f4d5e7d8b534fc331ac4680fe09a3b43fa9a5191.tar.gz
src-f4d5e7d8b534fc331ac4680fe09a3b43fa9a5191.zip
Restore the behaviour changed in r337536, when bad `ipfw delete` command
returns error. Now -q option only makes it quiet. And when -f flag is specified, the command will ignore errors and continue executing with next batched command. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=337574
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw.811
-rw-r--r--sbin/ipfw/ipfw2.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8
index 588f4c867729..8364de827787 100644
--- a/sbin/ipfw/ipfw.8
+++ b/sbin/ipfw/ipfw.8
@@ -1,7 +1,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 9, 2018
+.Dd August 10, 2018
.Dt IPFW 8
.Os
.Sh NAME
@@ -315,10 +315,15 @@ When listing and
.Fl d
is specified, also show expired dynamic rules.
.It Fl f
-Do not ask for confirmation for commands that can cause problems
-if misused, i.e.,
+Run without prompting for confirmation for commands that can cause problems if misused,
+i.e.,
.Cm flush .
If there is no tty associated with the process, this is implied.
+The
+.Cm delete
+command with this flag ignores possible errors,
+i.e., nonexistent rule number.
+And for batched commands execution continues with the next command.
.It Fl i
When listing a table (see the
.Sx LOOKUP TABLES
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index f6f64357d9b3..32a94edf7c42 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3314,7 +3314,7 @@ ipfw_delete(char *av[])
}
}
}
- if (exitval != EX_OK && co.do_quiet == 0)
+ if (exitval != EX_OK && co.do_force == 0)
exit(exitval);
}