]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
fix slightly changed semantics of iptc_is_builtin
authorHarald Welte <laforge@gnumonks.org>
Mon, 30 Aug 2004 16:00:09 +0000 (16:00 +0000)
committerHarald Welte <laforge@gnumonks.org>
Mon, 30 Aug 2004 16:00:09 +0000 (16:00 +0000)
iptables-restore.c
iptables.c

index c0ab99e210dacf54fc1ddc6420bed9ad3edcbb64..284f25c65fb06ecc0ba8b7fdefcf447aecbd1103 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This code is distributed under the terms of GNU GPL v2
  *
- * $Id: iptables-restore.c,v 1.34 2004/05/26 16:04:48 gandalf Exp $
+ * $Id: iptables-restore.c,v 1.35 2004/06/25 11:18:57 kadlec Exp $
  */
 
 #include <getopt.h>
@@ -231,7 +231,7 @@ main(int argc, char *argv[])
                                exit(1);
                        }
 
-                       if (!iptc_builtin(chain, handle)) {
+                       if (iptc_builtin(chain, handle) <= 0) {
                                DEBUGP("Creating new chain '%s'\n", chain);
                                if (!iptc_create_chain(chain, &handle)) 
                                        exit_error(PARAMETER_PROBLEM, 
index c69eb43de92702544db55c5e901ef84fbb8682a4..91e6a9e694223956e337ea01aae18cbe3630b2e8 100644 (file)
@@ -1490,7 +1490,7 @@ for_each_chain(int (*fn)(const ipt_chainlabel, int, iptc_handle_t *),
        for (i = 0; i < chaincount; i++) {
                if (!builtinstoo
                    && iptc_builtin(chains + i*sizeof(ipt_chainlabel),
-                                   *handle))
+                                   *handle) == 1)
                        continue;
                ret &= fn(chains + i*sizeof(ipt_chainlabel), verbose, handle);
        }