]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Fix listing/saving the new revision of the SET target
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 21 Jan 2011 20:55:05 +0000 (21:55 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 21 Jan 2011 20:55:05 +0000 (21:55 +0100)
Instead of the dimension of the set, the max dimension was used at
listing/saving the src,dst parameters, which produced broken output.

extensions/libxt_SET.c

index 2d186c58d0fa92d61e74ef4cdd344d1b8e1ea011..37da6ec13c94e492124d52e25b1f98735790d67e 100644 (file)
@@ -215,7 +215,7 @@ print_target(const char *prefix, const struct xt_set_info *info)
                return;
        get_set_byid(setname, info->index);
        printf("%s %s", prefix, setname);
-       for (i = 1; i <= IPSET_DIM_MAX; i++) {
+       for (i = 1; i <= info->dim; i++) {
                printf("%s%s",
                       i == 1 ? " " : ",",
                       info->flags & (1 << i) ? "src" : "dst");