diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-06-29 21:14:40 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-06-29 21:14:40 +0200 |
commit | 8dd10256cb24ceade8b40bd1604f03ddac8589e2 (patch) | |
tree | 9b6e5deae0b5d349122c82b63019d6bb36a66aeb /kernel/ip_set_hash_ipportnet.c | |
parent | 780f6384c5c6639da3f5a6ac8d30653e8a26d6c0 (diff) |
ipset 5: Sparc related and compatibility fixesv5.0-pre5
ipset 5 is tested on Sparc, which revealed some compatibility issues
and those are fixed. Kernels from 2.6.31 onward are supported.
The testsuite checkings are completed to run match/target checks.
The README file is updated to reflect the requirements to install
and run ipset 5.
Diffstat (limited to 'kernel/ip_set_hash_ipportnet.c')
-rw-r--r-- | kernel/ip_set_hash_ipportnet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/ip_set_hash_ipportnet.c b/kernel/ip_set_hash_ipportnet.c index 4bc44f5..f356a88 100644 --- a/kernel/ip_set_hash_ipportnet.c +++ b/kernel/ip_set_hash_ipportnet.c @@ -198,7 +198,7 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *head, int len, enum ipset_adt adt, u32 *lineno, u32 flags) { struct chash *h = set->data; - struct nlattr *tb[IPSET_ATTR_ADT_MAX]; + struct nlattr *tb[IPSET_ATTR_ADT_MAX+1]; ipset_adtfn adtfn = set->variant->adt[adt]; struct hash_ipportnet4_elem data = { .cidr = HOST_MASK, .proto = h->proto }; @@ -442,7 +442,7 @@ hash_ipportnet6_uadt(struct ip_set *set, struct nlattr *head, int len, enum ipset_adt adt, u32 *lineno, u32 flags) { struct chash *h = set->data; - struct nlattr *tb[IPSET_ATTR_ADT_MAX]; + struct nlattr *tb[IPSET_ATTR_ADT_MAX+1]; ipset_adtfn adtfn = set->variant->adt[adt]; struct hash_ipportnet6_elem data = { .cidr = HOST_MASK, .proto = h->proto }; @@ -526,7 +526,7 @@ static int hash_ipportnet_create(struct ip_set *set, struct nlattr *head, int len, u32 flags) { - struct nlattr *tb[IPSET_ATTR_CREATE_MAX]; + struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1]; struct chash *h; u32 hashsize = IPSET_DEFAULT_HASHSIZE, maxelem = IPSET_DEFAULT_MAXELEM; u8 proto = IPSET_IPPROTO_TCPUDP; /* Backward compatibility */ |