From 72127e87533fd1f1a7b9840e28a3f906a810c049 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=rusty/emailAddress=rusty@netfilter.org" 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(+) (limited to 'extensions/libipt_tos.c') 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) -- cgit v1.2.3