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

index 906f93eeff86b6def74a18049808e6b02db44749..76dddcba69b162b6718063fca0de97740817268c 100644 (file)
@@ -7,7 +7,7 @@
  *     Rusty Russell <rusty@linuxcare.com.au>
  * This code is distributed under the terms of GNU GPL v2
  *
- * $Id: ip6tables-restore.c,v 1.21 2004/02/02 20:14:56 gandalf Exp $
+ * $Id: ip6tables-restore.c,v 1.22 2004/05/26 16:04:48 gandalf Exp $
  */
 
 #include <getopt.h>
@@ -228,7 +228,7 @@ int main(int argc, char *argv[])
                                exit(1);
                        }
 
-                       if (!ip6tc_builtin(chain, handle)) {
+                       if (ip6tc_builtin(chain, handle) <= 0) {
                                DEBUGP("Creating new chain '%s'\n", chain);
                                if (!ip6tc_create_chain(chain, &handle))
                                        exit_error(PARAMETER_PROBLEM,
index 257f4eea39849a17ab98edee296d2bbd93bc160d..4b81e78283f0097d8f550fe0d7caf9568a4ff8af 100644 (file)
@@ -1492,7 +1492,7 @@ for_each_chain(int (*fn)(const ip6t_chainlabel, int, ip6tc_handle_t *),
        for (i = 0; i < chaincount; i++) {
                if (!builtinstoo
                    && ip6tc_builtin(chains + i*sizeof(ip6t_chainlabel),
-                                   *handle))
+                                   *handle) == 1)
                        continue;
                ret &= fn(chains + i*sizeof(ip6t_chainlabel), verbose, handle);
        }