]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ebtables: only call xt_compat_add_offset once per rule
authorFlorian Westphal <fw@strlen.de>
Thu, 21 Apr 2011 08:58:25 +0000 (10:58 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 10 May 2011 07:52:17 +0000 (09:52 +0200)
commitf52f0f9183772add2509cec81b6c7260ef917cac
tree0b4f2262a31df17d205a6ace7b1c7992c8ce1147
parent01d618b40c8362cb2aa971ba7480aaffcc12b72c
netfilter: ebtables: only call xt_compat_add_offset once per rule

The optimizations in commit bec25b1d3be43334
(netfilter: x_table: speedup compat operations) assume that
xt_compat_add_offset is called once per rule.

ebtables however called it for each match/target found in a rule.

The match/watcher/target parser already returns the needed delta, so it
is sufficient to move the xt_compat_add_offset call to a more reasonable
location.

While at it, also get rid of the unused COMPAT iterator macros.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/bridge/netfilter/ebtables.c