diff options
author | Florian Westphal <fw@strlen.de> | 2017-04-20 09:54:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-04-26 09:30:22 +0200 |
commit | 54044b1f0204da158a6a395bd02b63bb02ffff98 (patch) | |
tree | 253f70f735091ea2e9490f1c93e58d6e05fc0ed3 /net/netfilter/nf_nat_core.c | |
parent | 495dcb56d09ddb63afe30e799af41876c3f061cc (diff) | |
download | linux-stable-54044b1f0204da158a6a395bd02b63bb02ffff98.tar.gz linux-stable-54044b1f0204da158a6a395bd02b63bb02ffff98.tar.bz2 linux-stable-54044b1f0204da158a6a395bd02b63bb02ffff98.zip |
netfilter: conntrack: remove prealloc support
It was used by the nat extension, but since commit
7c9664351980 ("netfilter: move nat hlist_head to nf_conn") its only needed
for connections that use MASQUERADE target or a nat helper.
Also it seems a lot easier to preallocate a fixed size instead.
With default settings, conntrack first adds ecache extension (sysctl
defaults to 1), so we get 40(ct extension header) + 24 (ecache) == 64 byte
on x86_64 for initial allocation.
Followup patches can constify the extension structs and avoid
the initial zeroing of the entire extension area.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_nat_core.c')
-rw-r--r-- | net/netfilter/nf_nat_core.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 9cbf49f9c1b7..86eeacbb4793 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -717,7 +717,6 @@ static struct nf_ct_ext_type nat_extend __read_mostly = { .align = __alignof__(struct nf_conn_nat), .destroy = nf_nat_cleanup_conntrack, .id = NF_CT_EXT_NAT, - .flags = NF_CT_EXT_F_PREALLOC, }; #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |