Hi Liping,

On Fri, Jan 20, 2017 at 6:57 PM, Liping Zhang <zlpnob...@gmail.com> wrote:
> 2017-01-20 15:42 GMT+08:00 Feng Gao <gfree.w...@gmail.com>:
> [...]
>> In v2 patch, I copied your recommend codes "if (cnt && --cnt == 0)".
>> Today I think it is not right to use "--cnt", it should use "cnt--".
>> Because when the cnt is 1, the "--cnt" would break directly.
>> So I send the v3 patch.
>
> But this "if (cnt && cnt-- == 0) break;" check condition seems still 
> incorrect,
> when the cnt is 1, next round cnt will become 0, so we will fail to break the
> loop ...

Thanks your catch.
So we should keep the "(cnt && --cnt == 0)", with
_nf_tables_table_disable(net, afi, table, i+1) in the error handler of
nf_tables_table_enable.

Do you think if "i+1" is a little werid?

Regards
Feng
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to