]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xtables: compute exact size needed for jumpstack
authorFlorian Westphal <fw@strlen.de>
Tue, 14 Jul 2015 15:51:06 +0000 (17:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jul 2015 16:18:04 +0000 (18:18 +0200)
commit9dfdb419446a9c1eed042a8a1a366de614d5d343
tree6f16cde1d04c7f4b7f91303a886c714fe90a0de1
parent1e72f22c0e5dae8651332049bc39df597c5621be
netfilter: xtables: compute exact size needed for jumpstack

The {arp,ip,ip6tables} jump stack is currently sized based
on the number of user chains.

However, its rather unlikely that every user defined chain jumps to the
next, so lets use the existing loop detection logic to also track the
chain depths.

The stacksize is then set to the largest chain depth seen.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c