diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-01-24 15:49:16 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-01-24 15:49:16 +0100 |
commit | 584e8d0604a55fcda68848bef82a2954d8af71f5 (patch) | |
tree | aef63f4901d1a68e65d84a23646ac487a809e24f /kernel | |
parent | c896b069e6c9cd229119a791c51d19e8f11c853c (diff) |
New version 4.2 released:v4.2
kernel:
- nethash and ipportnethash types counted every entry twice
which could produce bogus entries when listing/saving these types
of sets (bug reported by Husnu Demir)
userspace:
- Checking null entries when listing/saving hash types of sets
deleted because it's unnecessary and can mask possible errors.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/ChangeLog | 5 | ||||
-rw-r--r-- | kernel/ip_set_ipportnethash.c | 1 | ||||
-rw-r--r-- | kernel/ip_set_nethash.c | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/kernel/ChangeLog b/kernel/ChangeLog index f613c94..1ad54cd 100644 --- a/kernel/ChangeLog +++ b/kernel/ChangeLog @@ -1,3 +1,8 @@ +4.2 + - nethash and ipportnethash types counted every entry twice + which could produce bogus entries when listing/saving these types + of sets (bug reported by Husnu Demir) + 4.1 - Do not use init_MUTEX either (Jan Engelhardt) - Improve listing/saving hash type of sets by not copying empty diff --git a/kernel/ip_set_ipportnethash.c b/kernel/ip_set_ipportnethash.c index f328972..e0bb352 100644 --- a/kernel/ip_set_ipportnethash.c +++ b/kernel/ip_set_ipportnethash.c @@ -185,7 +185,6 @@ ipportnethash_add(struct ip_set *set, if (ret == 0) { if (!map->nets[cidr-1]++) add_cidr_size(map->cidr, cidr); - map->elements++; } return ret; } diff --git a/kernel/ip_set_nethash.c b/kernel/ip_set_nethash.c index bf87f5c..e3b09e0 100644 --- a/kernel/ip_set_nethash.c +++ b/kernel/ip_set_nethash.c @@ -136,7 +136,6 @@ nethash_add(struct ip_set *set, ip_set_ip_t ip, uint8_t cidr) if (ret == 0) { if (!map->nets[cidr-1]++) add_cidr_size(map->cidr, cidr); - map->elements++; } return ret; |