diff options
author | Phil Sutter <phil@nwl.cc> | 2018-09-05 19:14:40 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-09-10 15:27:33 +0200 |
commit | 9242b5d9341434a5ae1491f64802df6926340d20 (patch) | |
tree | ffb72e9ed4e4d6a3d9f2380721f5202eb13fde7f /iptables/xtables-restore.c | |
parent | c9f4f04bafe36927d2bca7ecf717723e0d7410d7 (diff) |
xtables: Accept --wait in iptables-nft-restore
Passing --wait option to iptables-nft-restore led to program abort
because the flag parameter was not skipped. Mimick iptables-restore
behaviour when encountering --wait or --wait-interval options (but still
ignore the parameter).
Fixes: b9d7b49d84bc2 ("xtables-compat: restore: sync options with iptables-restore")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-restore.c')
-rw-r--r-- | iptables/xtables-restore.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index d187b129..9d15593f 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -419,6 +419,8 @@ xtables_restore_main(int family, const char *progname, int argc, char *argv[]) break; case 'w': /* fallthrough. Ignored by xt-restore */ case 'W': + if (!optarg && xs_has_arg(argc, argv)) + optind++; break; default: fprintf(stderr, |