Skip to content

Commit

Permalink
netfilter: ct_extend: fix the wrong alloc_size
Browse files Browse the repository at this point in the history
In function update_alloc_size(), sizeof(struct nf_ct_ext) is added twice
wrongly.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Changli Gao authored and Patrick McHardy committed Nov 15, 2010
1 parent b468645 commit 3b23688
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/netfilter/nf_conntrack_extend.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ static void update_alloc_size(struct nf_ct_ext_type *type)
if (!t1)
continue;

t1->alloc_size = sizeof(struct nf_ct_ext)
+ ALIGN(sizeof(struct nf_ct_ext), t1->align)
+ t1->len;
t1->alloc_size = ALIGN(sizeof(struct nf_ct_ext), t1->align) +
t1->len;
for (j = 0; j < NF_CT_EXT_NUM; j++) {
t2 = nf_ct_ext_types[j];
if (t2 == NULL || t2 == t1 ||
Expand Down

0 comments on commit 3b23688

Please sign in to comment.