summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Bouliane <nib@cookinglinux.org>2005-01-02 23:34:48 +0000
committerPatrick McHardy <kaber@trash.net>2005-01-02 23:34:48 +0000
commit708f7b97a5a7455abf5c3c5a86bf6603c6c7a1c5 (patch)
tree3205bf32ad7d2c935163d48786d810faf52fd830
parentf46e1afd45c6d735c8bb8f5a67286780ff40be6a (diff)
Prevent user from using --helper multiple times (Nicolas Bouliane <nib@cookinglinux.org>)
-rw-r--r--extensions/libipt_helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/extensions/libipt_helper.c b/extensions/libipt_helper.c
index 52047e48..10b39d74 100644
--- a/extensions/libipt_helper.c
+++ b/extensions/libipt_helper.c
@@ -44,6 +44,9 @@ parse(int c, char **argv, int invert, unsigned int *flags,
switch (c) {
case '1':
+ if (*flags)
+ exit_error(PARAMETER_PROBLEM,
+ "helper match: Only use --helper ONCE!");
check_inverse(optarg, &invert, &invert, 0);
strncpy(info->name, optarg, 29);
info->name[29] = '\0';