summaryrefslogtreecommitdiffstats
path: root/ip6tables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-06-12 20:48:52 +0200
committerJan Engelhardt <jengelh@medozas.de>2009-06-26 21:13:10 +0200
commitf89c1716a7743ca6e2e6164d3b64c15b2e285e1e (patch)
treecaaa6a6d656085690a71b791108c6a78365fe8dd /ip6tables.c
parent92edcb0cf517ddb7976e396eabc7a79f8a1016ba (diff)
iptables: allow for help-less extensions
This is for extensions that do not take any options, and which subsequently do not offer any help text either. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'ip6tables.c')
-rw-r--r--ip6tables.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/ip6tables.c b/ip6tables.c
index 71ff46f5..f974fb15 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include "ip6tables-multi.h"
+#include "xshared.h"
#ifndef TRUE
#define TRUE 1
@@ -235,9 +236,6 @@ exit_tryhelp(int status)
static void
exit_printhelp(struct xtables_rule_match *matches)
{
- struct xtables_rule_match *matchp = NULL;
- struct xtables_target *t = NULL;
-
printf("%s v%s\n\n"
"Usage: %s -[AD] chain rule-specification [options]\n"
" %s -I chain [rulenum] rule-specification [options]\n"
@@ -307,19 +305,7 @@ exit_printhelp(struct xtables_rule_match *matches)
" --set-counters PKTS BYTES set the counter during insert/append\n"
"[!] --version -V print package version.\n");
- /* Print out any special helps. A user might like to be able to add a --help
- to the commandline, and see expected results. So we call help for all
- specified matches & targets */
- for (t = xtables_targets; t; t = t->next) {
- if (t->used) {
- printf("\n");
- t->help();
- }
- }
- for (matchp = matches; matchp; matchp = matchp->next) {
- printf("\n");
- matchp->match->help();
- }
+ print_extension_helps(xtables_targets, matches);
exit(0);
}