Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Tomasz Bursztyka
Le 06/03/2013 16:32, Daniel Wagner a écrit : Hi Tomasz, On 03/06/2013 02:11 PM, Tomasz Bursztyka wrote: The orignal code assumes that the builtin chain is empty which is obviously always the right assumption :). That is actually the bug in the original code: it might not be empty. If it is, i

Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Daniel Wagner
Hi Tomasz, On 03/06/2013 02:11 PM, Tomasz Bursztyka wrote: The orignal code assumes that the builtin chain is empty which is obviously always the right assumption :). That is actually the bug in the original code: it might not be empty. If it is, it does the right change, if not it modifies th

Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Tomasz Bursztyka
Hi Daniel, The orignal code assumes that the builtin chain is empty which is obviously always the right assumption :). That is actually the bug in the original code: it might not be empty. If it is, it does the right change, if not it modifies the 1 rule in the chain. Tomasz _

Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Daniel Wagner
Hi Tomasz and Patrik On 03/06/2013 12:44 PM, Tomasz Bursztyka wrote: Hi Daniel and Patrik, On Wed, 2013-03-06 at 12:04 +0100, Daniel Wagner wrote: The policy of a chain is the last element not the first one. Isn't the default policy is applicable only for a builtin chain and is a property of

Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Tomasz Bursztyka
Hi Daniel and Patrik, On Wed, 2013-03-06 at 12:04 +0100, Daniel Wagner wrote: The policy of a chain is the last element not the first one. Isn't the default policy is applicable only for a builtin chain and is a property of the table itself?? This patch does not make sense: there is no polic

Re: [PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Patrik Flykt
On Wed, 2013-03-06 at 12:04 +0100, Daniel Wagner wrote: > The policy of a chain is the last element not the first one. Isn't the default policy is applicable only for a builtin chain and is a property of the table itself?? Cheers, Patrik ___ c

[PATCH v3 9/9] iptables: Fix setting policy

2013-03-06 Thread Daniel Wagner
From: Daniel Wagner The policy of a chain is the last element not the first one. --- src/iptables.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/iptables.c b/src/iptables.c index 086b8bf..aaf51e8 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1077,7 +