Commit 3b236880 authored by Changli Gao's avatar Changli Gao Committed by Patrick McHardy

netfilter: ct_extend: fix the wrong alloc_size

In function update_alloc_size(), sizeof(struct nf_ct_ext) is added twice
wrongly.
Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent b468645d
...@@ -144,9 +144,8 @@ static void update_alloc_size(struct nf_ct_ext_type *type) ...@@ -144,9 +144,8 @@ static void update_alloc_size(struct nf_ct_ext_type *type)
if (!t1) if (!t1)
continue; continue;
t1->alloc_size = sizeof(struct nf_ct_ext) t1->alloc_size = ALIGN(sizeof(struct nf_ct_ext), t1->align) +
+ ALIGN(sizeof(struct nf_ct_ext), t1->align) t1->len;
+ t1->len;
for (j = 0; j < NF_CT_EXT_NUM; j++) { for (j = 0; j < NF_CT_EXT_NUM; j++) {
t2 = nf_ct_ext_types[j]; t2 = nf_ct_ext_types[j];
if (t2 == NULL || t2 == t1 || if (t2 == NULL || t2 == t1 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment