summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/xshared.c')
-rw-r--r--iptables/xshared.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables/xshared.c b/iptables/xshared.c
index a3985d45..8d94fcd5 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -1864,8 +1864,11 @@ void ipv4_post_parse(int command, struct iptables_command_state *cs,
if (args->goto_set)
cs->fw.ip.flags |= IPT_F_GOTO;
+ /* nft-variants use cs->counters, legacy uses cs->fw.counters */
cs->counters.pcnt = args->pcnt_cnt;
cs->counters.bcnt = args->bcnt_cnt;
+ cs->fw.counters.pcnt = args->pcnt_cnt;
+ cs->fw.counters.bcnt = args->bcnt_cnt;
if (command & (CMD_REPLACE | CMD_INSERT |
CMD_DELETE | CMD_APPEND | CMD_CHECK)) {