]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
do not show potentially dangerous parameteres of ECN target (Alexey)
authorHarald Welte <laforge@gnumonks.org>
Tue, 6 Aug 2002 18:46:18 +0000 (18:46 +0000)
committerHarald Welte <laforge@gnumonks.org>
Tue, 6 Aug 2002 18:46:18 +0000 (18:46 +0000)
extensions/libipt_ECN.c
extensions/libipt_MARK.c

index 99b0f0e019e937b73c03f6c765cec15ce2dadd7e..4b332546c697ae15bbffd198c3d8dd733bc2d577 100644 (file)
@@ -6,7 +6,7 @@
  *
  * libipt_ECN.c borrowed heavily from libipt_DSCP.c
  *
- * $Id: libipt_ECN.c,v 1.8 2002/08/05 19:36:15 laforge Exp $
+ * $Id: libipt_ECN.c,v 1.9 2002/08/06 06:50:04 laforge Exp $
  */
 #include <stdio.h>
 #include <string.h>
@@ -25,14 +25,17 @@ static void help(void)
 {
        printf(
 "ECN target v%s options\n"
-"  --ecn-tcp-remove            Remove all ECN bits from TCP header\n"
+"  --ecn-tcp-remove            Remove all ECN bits from TCP header\n",
+               IPTABLES_VERSION, IPTABLES_VERSION);
+}
+
+#if 0
 "ECN target v%s EXPERIMENTAL options (use with extreme care!)\n"
 "  --ecn-ip-ect                        Set the IPv4 ECT codepoint (0 to 3)\n"
 "  --ecn-tcp-cwr               Set the IPv4 CWR bit (0 or 1)\n"
 "  --ecn-tcp-ece               Set the IPv4 ECE bit (0 or 1)\n",
-               IPTABLES_VERSION, IPTABLES_VERSION
-);
-}
+#endif
+
 
 static struct option opts[] = {
        { "ecn-tcp-remove", 0, 0, 'F' },
index 9774d4599ab8f5f5269086d404aab903e2ff148e..08630419ec9e42a451ac87d5edcd3ed757d0491c 100644 (file)
@@ -46,9 +46,9 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                = (struct ipt_mark_target_info *)(*target)->data;
 
        switch (c) {
-               char *end;
        case '1':
-               if (string_to_number(optarg, 0, 0xfffff, &markinfo->mark))
+               if (string_to_number(optarg, 0, 0xffffffff, 
+                                    (unsigned int *)&markinfo->mark))
                        exit_error(PARAMETER_PROBLEM, "Bad MARK value `%s'", optarg);
                if (*flags)
                        exit_error(PARAMETER_PROBLEM,