diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-11-15 05:47:52 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-11-15 05:47:52 -0500 |
commit | 3b2368806915e1e69ac3bcc0d6a7cfde64307655 (patch) | |
tree | 3399c888cc959adc1dfca183e343abff0ce81b78 | |
parent | b468645d72c2b4a15512f0a18e77670ea058b861 (diff) |
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: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | net/netfilter/nf_conntrack_extend.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index bd82450c193f..920f9244388b 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c | |||
@@ -144,9 +144,8 @@ static void update_alloc_size(struct nf_ct_ext_type *type) | |||
144 | if (!t1) | 144 | if (!t1) |
145 | continue; | 145 | continue; |
146 | 146 | ||
147 | t1->alloc_size = sizeof(struct nf_ct_ext) | 147 | t1->alloc_size = ALIGN(sizeof(struct nf_ct_ext), t1->align) + |
148 | + ALIGN(sizeof(struct nf_ct_ext), t1->align) | 148 | t1->len; |
149 | + t1->len; | ||
150 | for (j = 0; j < NF_CT_EXT_NUM; j++) { | 149 | for (j = 0; j < NF_CT_EXT_NUM; j++) { |
151 | t2 = nf_ct_ext_types[j]; | 150 | t2 = nf_ct_ext_types[j]; |
152 | if (t2 == NULL || t2 == t1 || | 151 | if (t2 == NULL || t2 == t1 || |