diff options
author | Nicolas Bouliane <nib@cookinglinux.org> | 2004-12-20 05:11:59 +0000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2004-12-20 05:11:59 +0000 |
commit | 0b46d1db6b3b71265b1c1a15dbfca4025ab26494 (patch) | |
tree | 621d5a68a40df22969def18c79e9f30553892d5d /extensions/libipt_tos.c | |
parent | 0f9b8b158bb71b96c6b2908f5bf7bb9670ff4eb0 (diff) |
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.
Diffstat (limited to 'extensions/libipt_tos.c')
-rw-r--r-- | extensions/libipt_tos.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |