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
This commit is contained in:
parent
a1d444e140
commit
dbadd6b028
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157332
@ -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)");
|
||||
|
Loading…
Reference in New Issue
Block a user