diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-11-30 19:56:56 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-12-03 12:43:36 +0100 |
commit | 77b4311d207c3ed7260da840ba41afa8bd9ca24c (patch) | |
tree | e922eb35a141a9803ed49c2de09788392d8175b1 /net/netfilter | |
parent | 25a76f3463e0424fdf85773afb4be4972b1c0a29 (diff) | |
download | op-kernel-dev-77b4311d207c3ed7260da840ba41afa8bd9ca24c.zip op-kernel-dev-77b4311d207c3ed7260da840ba41afa8bd9ca24c.tar.gz |
netfilter: ipset: Allocate the proper size of memory when /0 networks are supported
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipset/ip_set_hash_gen.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h index 8ef9135..974ff38 100644 --- 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) |