[netfilter-cvslog] r3468 - trunk/iptables/extensions

rusty at netfilter.org rusty at netfilter.org
Mon Dec 20 06:12:00 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-20 06:11:59 +0100 (Mon, 20 Dec 2004)
New Revision: 3468

Modified:
   trunk/iptables/extensions/libipt_tos.c
Log:
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.


Modified: trunk/iptables/extensions/libipt_tos.c
===================================================================
--- trunk/iptables/extensions/libipt_tos.c	2004-12-20 04:31:48 UTC (rev 3467)
+++ trunk/iptables/extensions/libipt_tos.c	2004-12-20 05:11:59 UTC (rev 3468)
@@ -91,6 +91,11 @@
 
 	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)




More information about the netfilter-cvslog mailing list