projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a76f3
)
netfilter: ipset: Allocate the proper size of memory when /0 networks are supported
author
Jozsef Kadlecsik
<
[email protected]
>
Sun, 30 Nov 2014 18:56:56 +0000
(19:56 +0100)
committer
Pablo Neira Ayuso
<
[email protected]
>
Wed, 3 Dec 2014 11:43:36 +0000
(12:43 +0100)
Signed-off-by: Jozsef Kadlecsik <
[email protected]
>
Signed-off-by: Pablo Neira Ayuso <
[email protected]
>
net/netfilter/ipset/ip_set_hash_gen.h
patch
|
blob
|
history
diff --git
a/net/netfilter/ipset/ip_set_hash_gen.h
b/net/netfilter/ipset/ip_set_hash_gen.h
index 8ef9135d8bb5198994617fcd44c975387de3f188..974ff386db0fc118596d58311e1b6ba54cf8973a 100644
(file)
--- a/
net/netfilter/ipset/ip_set_hash_gen.h
+++ b/
net/netfilter/ipset/ip_set_hash_gen.h
@@
-1101,8
+1101,7
@@
IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
hsize = sizeof(*h);
#ifdef IP_SET_HASH_WITH_NETS
- hsize += sizeof(struct net_prefixes) *
- (set->family == NFPROTO_IPV4 ? 32 : 128);
+ hsize += sizeof(struct net_prefixes) * NLEN(set->family);
#endif
h = kzalloc(hsize, GFP_KERNEL);
if (!h)