Hi Tomasz,
On 03/06/2013 01:18 PM, Tomasz Bursztyka wrote:
Actually:
This check does not make sense at all. We want to insert the new
rule always on the first position, that means the chain_head
points to the 'old' entry.
Wait no: this is only true when you insert a rule, not when you append one.
We do not append at all. There is no append function. Have you tested
with a few rules in the chain? The empty chain case and the non empty
chain is slightly different for builtin and custom chains.
And finally - my mistake because I should have reviewed it properly - I
am not happy with your: __connman_iptables_append()
I can't follow. __connman_iptables_append() adds the rules at the
beginning of the chain. So the name is missleading in my opinion.
It does not append, it inserts. It reminds me why I was maintaining in
// the iptables-test.c tool.
It's annoying but it's useful to find such regressions.
What about the unit tests?
Hopefully iptables api in ConnMan is almost not used, so it does not
affect anything... yet :)
I sent a complete series for per session routing and statistic which do
depend on correct iptables operations.
I'll move this patch to the series 'refactoring'.
cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman