From 584e8d0604a55fcda68848bef82a2954d8af71f5 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sun, 24 Jan 2010 15:49:16 +0100 Subject: New version 4.2 released: 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. --- ipset_nethash.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ipset_nethash.c') diff --git a/ipset_nethash.c b/ipset_nethash.c index 50ca1bd..c7891cf 100644 --- a/ipset_nethash.c +++ b/ipset_nethash.c @@ -232,8 +232,7 @@ nethash_printips(struct set *set UNUSED, void *data, u_int32_t len, while (offset < len) { ip = data + offset; - if (*ip) - printf("%s\n", unpack_ip_tostring(*ip, options)); + printf("%s\n", unpack_ip_tostring(*ip, options)); offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align); } } @@ -258,9 +257,8 @@ nethash_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, - unpack_ip_tostring(*ip, options)); + printf("-A %s %s\n", set->name, + unpack_ip_tostring(*ip, options)); offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align); } } -- cgit v1.2.3