Commit cdb436d1 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: conntrack: avoid excess memory allocation

This is now a fixed-size extension, so we don't need to pass a variable
alloc size.  This (harmless) error results in allocating 32 instead of
the needed 16 bytes for this extension as the size gets passed twice.

Fixes: 23014011 ("netfilter: conntrack: support a fixed size of 128 distinct labels")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent f1d505bb
...@@ -30,8 +30,7 @@ static inline struct nf_conn_labels *nf_ct_labels_ext_add(struct nf_conn *ct) ...@@ -30,8 +30,7 @@ static inline struct nf_conn_labels *nf_ct_labels_ext_add(struct nf_conn *ct)
if (net->ct.labels_used == 0) if (net->ct.labels_used == 0)
return NULL; return NULL;
return nf_ct_ext_add_length(ct, NF_CT_EXT_LABELS, return nf_ct_ext_add(ct, NF_CT_EXT_LABELS, GFP_ATOMIC);
sizeof(struct nf_conn_labels), GFP_ATOMIC);
#else #else
return NULL; return NULL;
#endif #endif
......
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