[netfilter-cvslog] r4544 - trunk/iptables/extensions
kaber at netfilter.org
kaber at netfilter.org
Fri Nov 18 18:59:57 CET 2005
Author: kaber at netfilter.org
Date: 2005-11-18 18:59:56 +0100 (Fri, 18 Nov 2005)
New Revision: 4544
Modified:
trunk/iptables/extensions/libipt_ttl.c
Log:
Don't eat numeric arguments for other extensions
Modified: trunk/iptables/extensions/libipt_ttl.c
===================================================================
--- trunk/iptables/extensions/libipt_ttl.c 2005-11-17 13:34:51 UTC (rev 4543)
+++ trunk/iptables/extensions/libipt_ttl.c 2005-11-18 17:59:56 UTC (rev 4544)
@@ -33,12 +33,12 @@
check_inverse(optarg, &invert, &optind, 0);
- if (string_to_number(optarg, 0, 255, &value) == -1)
- exit_error(PARAMETER_PROBLEM,
- "ttl: Expected value between 0 and 255");
-
switch (c) {
case '2':
+ if (string_to_number(optarg, 0, 255, &value) == -1)
+ exit_error(PARAMETER_PROBLEM,
+ "ttl: Expected value between 0 and 255");
+
if (invert)
info->mode = IPT_TTL_NE;
else
@@ -48,6 +48,10 @@
info->ttl = value;
break;
case '3':
+ if (string_to_number(optarg, 0, 255, &value) == -1)
+ exit_error(PARAMETER_PROBLEM,
+ "ttl: Expected value between 0 and 255");
+
if (invert)
exit_error(PARAMETER_PROBLEM,
"ttl: unexpected `!'");
@@ -56,6 +60,10 @@
info->ttl = value;
break;
case '4':
+ if (string_to_number(optarg, 0, 255, &value) == -1)
+ exit_error(PARAMETER_PROBLEM,
+ "ttl: Expected value between 0 and 255");
+
if (invert)
exit_error(PARAMETER_PROBLEM,
"ttl: unexpected `!'");
More information about the netfilter-cvslog
mailing list