diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=rusty/emailAddress=rusty@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=rusty/emailAddress=rusty@netfilter.org> | 2004-12-20 05:11:59 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=rusty/emailAddress=rusty@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=rusty/emailAddress=rusty@netfilter.org> | 2004-12-20 05:11:59 +0000 |
commit | 72127e87533fd1f1a7b9840e28a3f906a810c049 (patch) | |
tree | 621d5a68a40df22969def18c79e9f30553892d5d /extensions/libipt_tos.c | |
parent | d24c86bf172d302a00cdf57fd3b7b2f7fc113b39 (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 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) |