summaryrefslogtreecommitdiffstats
path: root/iptables/xtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/xtables.c')
-rw-r--r--iptables/xtables.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c
index c49b4a2f..7a8ace3d 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -678,7 +678,8 @@ static void command_match(struct iptables_command_state *cs)
xtables_error(OTHER_PROBLEM, "can't alloc memory!");
}
-int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
+int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table,
+ bool restore)
{
struct iptables_command_state cs;
int verbose = 0;
@@ -1001,6 +1002,14 @@ int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
prog_name, prog_vers);
exit(0);
+ case 'w':
+ if (restore) {
+ xtables_error(PARAMETER_PROBLEM,
+ "You cannot use `-w' from "
+ "iptables-restore");
+ }
+ break;
+
case '0':
set_option(&cs.options, OPT_LINENUMBERS,
&args.invflags, cs.invert);