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