summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarc <marc>2000-04-22 22:36:10 +0000
committermarc <marc>2000-04-22 22:36:10 +0000
commit7fb79f4e314a3fa65df3085bae71e8c12da630de (patch)
treeb1e5bd3f549049aaae639d26066a67cdd901a429
parent3dddbc62dcca232393ca9f334f33add1ecc73d69 (diff)
Fix for iptables -C coredump due to check_packet() being called with fw=NULL
-rw-r--r--iptables.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables.c b/iptables.c
index a4d6a0e..a6e16ae 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1814,7 +1814,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
exit_error(PARAMETER_PROBLEM,
"nothing appropriate following !");
- if (command & (CMD_REPLACE | CMD_INSERT | CMD_DELETE | CMD_APPEND)) {
+ if (command & (CMD_REPLACE | CMD_INSERT | CMD_DELETE | CMD_APPEND |
+ CMD_CHECK)) {
if (!(options & OPT_DESTINATION))
dhostnetworkmask = "0.0.0.0/0";
if (!(options & OPT_SOURCE))
@@ -1855,7 +1856,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
"can't initialize iptables table `%s': %s",
*table, iptc_strerror(errno));
- if (command == CMD_APPEND
+ if (command == CMD_CHECK
+ || command == CMD_APPEND
|| command == CMD_DELETE
|| command == CMD_INSERT
|| command == CMD_REPLACE) {