[iptables PATCH 1/2] ip{,6}tables-restore: Don't ignore missing wait-interval value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Passing -W without a value doesn't make sense so bail out if none was
given.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 iptables/xshared.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iptables/xshared.c b/iptables/xshared.c
index 825479c338214..06db72d427e21 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -343,7 +343,7 @@ void parse_wait_interval(int argc, char *argv[], struct timeval *wait_interval)
 	else if (xs_has_arg(argc, argv))
 		arg = argv[optind++];
 	else
-		return;
+		xtables_error(PARAMETER_PROBLEM, "wait interval value required");
 
 	ret = sscanf(arg, "%u", &usec);
 	if (ret == 1) {
-- 
2.13.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux