|
|
ab08bb |
From a7da716205fb6009f665a4e91b28c7782cf47ce2 Mon Sep 17 00:00:00 2001
|
|
|
ab08bb |
From: Phil Sutter <psutter@redhat.com>
|
|
|
ab08bb |
Date: Fri, 11 May 2018 16:34:48 +0200
|
|
|
ab08bb |
Subject: [PATCH] ip{,6}tables-restore: Don't accept wait-interval without wait
|
|
|
ab08bb |
|
|
|
ab08bb |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465078
|
|
|
ab08bb |
Upstream Status: iptables commit 21ba5b3874fb3
|
|
|
ab08bb |
|
|
|
ab08bb |
commit 21ba5b3874fb3d0c4cccc9b59f65c8df575211e2
|
|
|
ab08bb |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
ab08bb |
Date: Wed Sep 20 19:34:36 2017 +0200
|
|
|
ab08bb |
|
|
|
ab08bb |
ip{,6}tables-restore: Don't accept wait-interval without wait
|
|
|
ab08bb |
|
|
|
ab08bb |
If -W <val> was given, error out if -w wasn't since that doesn't make
|
|
|
ab08bb |
sense.
|
|
|
ab08bb |
|
|
|
ab08bb |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
ab08bb |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
ab08bb |
|
|
|
ab08bb |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
ab08bb |
---
|
|
|
ab08bb |
iptables/ip6tables-restore.c | 5 +++++
|
|
|
ab08bb |
iptables/iptables-restore.c | 5 +++++
|
|
|
ab08bb |
2 files changed, 10 insertions(+)
|
|
|
ab08bb |
|
|
|
ab08bb |
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
|
|
|
ab08bb |
index 0f85fee3593d5..e2a82c57bd426 100644
|
|
|
ab08bb |
--- a/iptables/ip6tables-restore.c
|
|
|
ab08bb |
+++ b/iptables/ip6tables-restore.c
|
|
|
ab08bb |
@@ -271,6 +271,11 @@ int ip6tables_restore_main(int argc, char *argv[])
|
|
|
ab08bb |
}
|
|
|
ab08bb |
else in = stdin;
|
|
|
ab08bb |
|
|
|
ab08bb |
+ if (!wait_interval.tv_sec && !wait) {
|
|
|
ab08bb |
+ fprintf(stderr, "Option --wait-interval requires option --wait\n");
|
|
|
ab08bb |
+ exit(1);
|
|
|
ab08bb |
+ }
|
|
|
ab08bb |
+
|
|
|
ab08bb |
/* Grab standard input. */
|
|
|
ab08bb |
while (fgets(buffer, sizeof(buffer), in)) {
|
|
|
ab08bb |
int ret = 0;
|
|
|
ab08bb |
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
|
|
|
ab08bb |
index 6d0df8d1c0f36..af0c79408631d 100644
|
|
|
ab08bb |
--- a/iptables/iptables-restore.c
|
|
|
ab08bb |
+++ b/iptables/iptables-restore.c
|
|
|
ab08bb |
@@ -270,6 +270,11 @@ iptables_restore_main(int argc, char *argv[])
|
|
|
ab08bb |
}
|
|
|
ab08bb |
else in = stdin;
|
|
|
ab08bb |
|
|
|
ab08bb |
+ if (!wait_interval.tv_sec && !wait) {
|
|
|
ab08bb |
+ fprintf(stderr, "Option --wait-interval requires option --wait\n");
|
|
|
ab08bb |
+ exit(1);
|
|
|
ab08bb |
+ }
|
|
|
ab08bb |
+
|
|
|
ab08bb |
/* Grab standard input. */
|
|
|
ab08bb |
while (fgets(buffer, sizeof(buffer), in)) {
|
|
|
ab08bb |
int ret = 0;
|
|
|
ab08bb |
--
|
|
|
ab08bb |
2.17.0
|
|
|
ab08bb |
|