If -W <val> was given, error out if -w wasn't since that doesn't make
sense.

Signed-off-by: Phil Sutter <p...@nwl.cc>
---
 iptables/ip6tables-restore.c | 5 +++++
 iptables/iptables-restore.c  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index eaa2bcbc3856e..47310f20b9363 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -273,6 +273,11 @@ int ip6tables_restore_main(int argc, char *argv[])
        }
        else in = stdin;
 
+       if (!wait_interval.tv_sec && !wait) {
+               fprintf(stderr, "Option --wait-interval requires option 
--wait\n");
+               exit(1);
+       }
+
        /* Grab standard input. */
        while (fgets(buffer, sizeof(buffer), in)) {
                int ret = 0;
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 9dbfc572a7cec..074552af5dc74 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -271,6 +271,11 @@ iptables_restore_main(int argc, char *argv[])
        }
        else in = stdin;
 
+       if (!wait_interval.tv_sec && !wait) {
+               fprintf(stderr, "Option --wait-interval requires option 
--wait\n");
+               exit(1);
+       }
+
        /* Grab standard input. */
        while (fgets(buffer, sizeof(buffer), in)) {
                int ret = 0;
-- 
2.13.1

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

Reply via email to