From 0b46d1db6b3b71265b1c1a15dbfca4025ab26494 Mon Sep 17 00:00:00 2001 From: Nicolas Bouliane Date: Mon, 20 Dec 2004 05:11:59 +0000 Subject: Nicolas Bouliane: I was writing an nfsim .sim for the match tos, when I realized that when we enter --tos twice the second overwrite the first. --- extensions/libipt_tos.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c index 6786911d..0d6a1d04 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) -- cgit v1.2.3