]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Fix for iptables -C coredump due to check_packet() being called with fw=NULL
authorMarc Boucher <marc@mbsi.ca>
Sat, 22 Apr 2000 22:36:10 +0000 (22:36 +0000)
committerMarc Boucher <marc@mbsi.ca>
Sat, 22 Apr 2000 22:36:10 +0000 (22:36 +0000)
iptables.c

index a4d6a0ea7d8833bb55390d422628a31c348c9035..a6e16ae1a3fffbdca670a18e0d364e1a8b170fae 100644 (file)
@@ -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) {