summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libipt_tos.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c
index 6786911..0d6a1d0 100644
--- a/extensions/libipt_tos.c
+++ b/extensions/libipt_tos.c
@@ -91,6 +91,11 @@ parse(int c, char **argv, int invert, unsigned int *flags,
switch (c) {
case '1':
+ /* Ensure that `--tos' haven't been used yet. */
+ if (*flags == 1)
+ exit_error(PARAMETER_PROBLEM,
+ "tos match: only use --tos once!");
+
check_inverse(optarg, &invert, &optind, 0);
parse_tos(argv[optind-1], tosinfo);
if (invert)