netfilter: nft_compat: fix handling of large matchinfo size
authorFlorian Westphal <fw@strlen.de>
Mon, 7 May 2018 13:22:36 +0000 (15:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 9 May 2018 08:09:27 +0000 (10:09 +0200)
commit732a8049f365f514d0607e03938491bf6cb0d620
tree5054f81410b520b230fe2d8c53e6c0d87c3f348f
parent8bdf164744b2c7f63561846c01cff3db597f282d
netfilter: nft_compat: fix handling of large matchinfo size

currently matchinfo gets stored in the expression, but some xt matches
are very large.

To handle those we either need to switch nft core to kvmalloc and increase
size limit, or allocate the info blob of large matches separately.

This does the latter, this limits the scope of the changes to
nft_compat.

I picked a threshold of 192, this allows most matches to work as before and
handle only few ones via separate alloation (cgroup, u32, sctp, rt).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_compat.c