summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-03-01 00:27:50 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-03-01 00:27:50 +0100
commit7c1b69b97571ddeb8c624b0a1da366a456895a6d (patch)
treef10f428f804c0f2ccc1540c112d94f5cf85da26c
parentd65702c5c5bbab0ef12298386fa4098c72584e6c (diff)
Revert "libiptc: Returns the position the entry was inserted"
This reverts commit d65702c5c5bbab0ef12298386fa4098c72584e6c. This is breaking my iptables scripts: iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT iptables: Incompatible with this kernel.
-rw-r--r--include/libiptc/libiptc.h3
-rw-r--r--libiptc/libiptc.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/include/libiptc/libiptc.h b/include/libiptc/libiptc.h
index b9a42c96..24cdbdb7 100644
--- a/include/libiptc/libiptc.h
+++ b/include/libiptc/libiptc.h
@@ -74,8 +74,7 @@ int iptc_replace_entry(const xt_chainlabel chain,
struct xtc_handle *handle);
/* Append entry `e' to chain `chain'. Equivalent to insert with
- rulenum = length of chain. Returns the position the entry was
- inserted or 0 if an error occurs */
+ rulenum = length of chain. */
int iptc_append_entry(const xt_chainlabel chain,
const struct ipt_entry *e,
struct xtc_handle *handle);
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c
index ddaee128..63fcfc2a 100644
--- a/libiptc/libiptc.c
+++ b/libiptc/libiptc.c
@@ -1836,8 +1836,7 @@ TC_REPLACE_ENTRY(const IPT_CHAINLABEL chain,
}
/* Append entry `fw' to chain `chain'. Equivalent to insert with
- rulenum = length of chain. Returns the position the entry was
- inserted or 0 if an error occurs */
+ rulenum = length of chain. */
int
TC_APPEND_ENTRY(const IPT_CHAINLABEL chain,
const STRUCT_ENTRY *e,
@@ -1873,7 +1872,7 @@ TC_APPEND_ENTRY(const IPT_CHAINLABEL chain,
set_changed(handle);
- return c->num_rules;
+ return 1;
}
static inline int