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 /ipset_iphash.c | |
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 'ipset_iphash.c')
-rw-r--r-- | ipset_iphash.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ipset_iphash.c b/ipset_iphash.c index b352df4..0bc5bd1 100644 --- a/ipset_iphash.c +++ b/ipset_iphash.c @@ -200,8 +200,7 @@ iphash_printips(struct set *set UNUSED, void *data, u_int32_t len, while (offset < len) { ip = data + offset; - if (*ip) - printf("%s\n", ip_tostring(*ip, options)); + printf("%s\n", ip_tostring(*ip, options)); offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align); } } @@ -230,9 +229,7 @@ iphash_saveips(struct set *set UNUSED, void *data, u_int32_t len, while (offset < len) { ip = data + offset; - if (*ip) - printf("-A %s %s\n", set->name, - ip_tostring(*ip, options)); + printf("-A %s %s\n", set->name, ip_tostring(*ip, options)); offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align); } } |