summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2006-03-31 12:40:09 +0000
committerjulian <julian@FreeBSD.org>2006-03-31 12:40:09 +0000
commitbce212e4e5ce65f246a90972498cc75a379adefe (patch)
tree444e909d36d85507d2ba329980d1b50d630dc7da /sbin
parent063f9c01c6f02b5f5b49d777a06d53627048e260 (diff)
downloadFreeBSD-src-bce212e4e5ce65f246a90972498cc75a379adefe.zip
FreeBSD-src-bce212e4e5ce65f246a90972498cc75a379adefe.tar.gz
I can't believe that no-one noticed that I broke ipfw table del
for over a month! put {} around if clause with multiple statements
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 195e991..6782dfc 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -4820,12 +4820,13 @@ table_handler(int ac, char *av[])
err(EX_OSERR, "setsockopt(IP_FW_TABLE_%s)",
do_add ? "ADD" : "DEL");
/* In silent mode, react to a failed add by deleting */
- if (do_add)
+ if (do_add) {
do_cmd(IP_FW_TABLE_DEL, &ent, sizeof(ent));
if (do_cmd(IP_FW_TABLE_ADD,
&ent, sizeof(ent)) < 0)
err(EX_OSERR,
"setsockopt(IP_FW_TABLE_ADD)");
+ }
} else if (_substrcmp(*av, "flush") == 0) {
if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, sizeof(ent.tbl)) < 0)
err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)");
OpenPOWER on IntegriCloud