From 3a506ace804781fed313965590b234af7753647e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 30 Aug 2004 16:00:09 +0000 Subject: fix slightly changed semantics of iptc_is_builtin --- iptables-restore.c | 4 ++-- iptables.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iptables-restore.c b/iptables-restore.c index c0ab99e2..284f25c6 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -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 @@ -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, diff --git a/iptables.c b/iptables.c index c69eb43d..91e6a9e6 100644 --- a/iptables.c +++ b/iptables.c @@ -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); } -- cgit v1.2.3