diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-06-19 22:24:53 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-06-19 22:24:53 +0200 |
commit | 1b4f87c8d9f466edfaa25896892031d78738f335 (patch) | |
tree | 643333b4a0402a581648fe134f92c76309a463fe | |
parent | 59d72e349a19da49d22934c1cdab914c3087c702 (diff) |
ipset help lists set types multiple times, fixed (reported by Mr Dash Four)
ipset help listed every set type, including the ones with multiple
revisions - which were listed thus multiple times. Set types with
multiple revisions are listed once from now on.
-rw-r--r-- | src/ipset.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipset.c b/src/ipset.c index 8e5411f..e649f08 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -623,10 +623,14 @@ parse_commandline(int argc, char *argv[]) type->family == NFPROTO_IPV4 ? "INET" : "INET6"); } else { + const char *name = NULL; + printf("\nSupported set types:\n"); type = ipset_types(); while (type) { - printf(" %s\n", type->name); + if (!(name && STREQ(name, type->name))) + printf(" %s\n", type->name); + name = type->name; type = type->next; } } |