While nft-variants don't care, legacy ones do. Signed-off-by: Phil Sutter <phil@xxxxxx> --- iptables/xshared.c | 8 +++----- iptables/xshared.h | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iptables/xshared.c b/iptables/xshared.c index 4c8ee3aa20278..b7dad707d1d1a 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -1311,11 +1311,9 @@ void do_parse(int argc, char *argv[], struct xtables_match *m; struct xtables_rule_match *matchp; bool wait_interval_set = false; - struct timeval wait_interval; struct xtables_target *t; bool table_set = false; bool invert = false; - int wait = 0; /* re-set optind to 0 in case do_command4 gets called * a second time */ @@ -1658,7 +1656,7 @@ void do_parse(int argc, char *argv[], "iptables-restore"); } - wait = parse_wait_time(argc, argv); + args->wait = parse_wait_time(argc, argv); break; case 'W': @@ -1668,7 +1666,7 @@ void do_parse(int argc, char *argv[], "iptables-restore"); } - parse_wait_interval(argc, argv, &wait_interval); + parse_wait_interval(argc, argv, &args->wait_interval); wait_interval_set = true; break; @@ -1753,7 +1751,7 @@ void do_parse(int argc, char *argv[], "\nThe \"nat\" table is not intended for filtering, " "the use of DROP is therefore inhibited.\n\n"); - if (!wait && wait_interval_set) + if (!args->wait && wait_interval_set) xtables_error(PARAMETER_PROBLEM, "--wait-interval only makes sense with --wait\n"); diff --git a/iptables/xshared.h b/iptables/xshared.h index 13ea05fef87e0..48bfe911f7a47 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -293,6 +293,8 @@ struct xtables_args { const char *arp_hlen, *arp_opcode; const char *arp_htype, *arp_ptype; unsigned long long pcnt_cnt, bcnt_cnt; + int wait; + struct timeval wait_interval; }; struct xt_cmd_parse_ops { -- 2.34.1