]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: CONFIG_COMPAT: allow delta to exceed 32767
authorFlorian Westphal <fwestphal@astaro.com>
Mon, 15 Feb 2010 17:17:10 +0000 (18:17 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 15 Feb 2010 17:17:10 +0000 (18:17 +0100)
commit3c077c017abb3262f7f124fedd17ef39d55a1633
treea78b8d92a63dd217e114a02e1ff0902e5e23cc41
parentbf8cd7ac42f57efea22600f7392e44493c40d127
netfilter: CONFIG_COMPAT: allow delta to exceed 32767

with 32 bit userland and 64 bit kernels, it is unlikely but possible
that insertion of new rules fails even tough there are only about 2000
iptables rules.

This happens because the compat delta is using a short int.
Easily reproducible via "iptables -m limit" ; after about 2050
rules inserting new ones fails with -ELOOP.

Note that compat_delta included 2 bytes of padding on x86_64, so
structure size remains the same.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/x_tables.h
net/netfilter/x_tables.c