]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Nicolas Bouliane: I was writing an nfsim .sim for the match tos, when I realized...
authorNicolas Bouliane <nib@cookinglinux.org>
Mon, 20 Dec 2004 05:11:59 +0000 (05:11 +0000)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Dec 2004 05:11:59 +0000 (05:11 +0000)
extensions/libipt_tos.c

index 6786911d7688c78bc0b46846aa779750f97fa90a..0d6a1d04c3afcbae0104473f0ad9c00b507b9a35 100644 (file)
@@ -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)