diff options
author | Jonh Wendell <jonh.wendell@vexcorp.com> | 2012-01-04 15:44:01 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-29 13:48:00 +0100 |
commit | d65702c5c5bbab0ef12298386fa4098c72584e6c (patch) | |
tree | 1a061792b1080f48cee26e72dd14aa67e0010afc /libiptc/libiptc.c | |
parent | 98e1769b65b71989e3f16b25529b40f374aef323 (diff) |
libiptc: Returns the position the entry was inserted
Jan Engelhardt showed no objections to this patch.
Diffstat (limited to 'libiptc/libiptc.c')
-rw-r--r-- | libiptc/libiptc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 63fcfc2a..ddaee128 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1836,7 +1836,8 @@ TC_REPLACE_ENTRY(const IPT_CHAINLABEL chain, } /* Append entry `fw' to chain `chain'. Equivalent to insert with - rulenum = length of chain. */ + rulenum = length of chain. Returns the position the entry was + inserted or 0 if an error occurs */ int TC_APPEND_ENTRY(const IPT_CHAINLABEL chain, const STRUCT_ENTRY *e, @@ -1872,7 +1873,7 @@ TC_APPEND_ENTRY(const IPT_CHAINLABEL chain, set_changed(handle); - return 1; + return c->num_rules; } static inline int |