]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ip{,6}tables-restore: Don't ignore missing wait-interval value
authorPhil Sutter <phil@nwl.cc>
Wed, 20 Sep 2017 17:34:35 +0000 (19:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Oct 2017 13:54:00 +0000 (15:54 +0200)
Passing -W without a value doesn't make sense so bail out if none was
given.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xshared.c

index 825479c3382146f9a921d30a70b8a0356574a78d..06db72d427e21581be9327c6a4e65570ecaf8845 100644 (file)
@@ -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) {