Hi Patrik,
On 03/19/2013 12:38 PM, Patrik Flykt wrote:
On Fri, 2013-03-15 at 13:50 +0100, Daniel Wagner wrote:
This was wrongly removed with commit 161efbae
It seems that a 'static int iptables_insert_rule()' function is still
around after this commit.
__connman_iptables_insert() is using iptables_insert_rule(). The
difference between iptables_insert_rule() and iptables_append_rule() is
the 'before' list pointer for iptables_add_entry(). That is the 3rd
argument for that function. iptables_add_entry() always 'inserts' a new
rule before that element.
iptables_insert_rule():
chain_head = find_chain_head(table, chain_name);
[...]
iptables_add_entry(table, new_entry, chain_head, builtin);
iptables_append_rule():
chain_tail = find_chain_tail(table, chain_name);
[...]
iptables_add_entry(table, new_entry, chain_tail->prev, builtin);
That is the reason why iptables_insert_rule() still exists.
cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman