summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-10-08 10:44:20 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-12-30 23:50:52 +0100
commit5f6e384ac2a3d7b647a909654a3bdee1c0bcb3eb (patch)
tree8ff19a400766d25801433cf23c44f90951fe0250 /iptables/nft-shared.c
parent4b7a4afaa240e5d2039e612e125b045d5d1cb7fa (diff)
nft: pass ipt_entry to ->save_firewall hook
The extension needs the ipt_entry not to crash. Since cs->fw actually points to an union that also contains cs->fw6, just pass cs->fw to make it work. This fixes: -A INPUT -p tcp -m multiport --ports 1,2,3,4,6,7,8,9,10,11,12,13,14,15 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r--iptables/nft-shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
index 25cb1772..ebcb9692 100644
--- a/iptables/nft-shared.c
+++ b/iptables/nft-shared.c
@@ -633,14 +633,14 @@ void print_matches_and_target(struct iptables_command_state *cs,
for (matchp = cs->matches; matchp; matchp = matchp->next) {
if (matchp->match->print != NULL) {
- matchp->match->print(NULL, matchp->match->m,
+ matchp->match->print(&cs->fw, matchp->match->m,
format & FMT_NUMERIC);
}
}
if (cs->target != NULL) {
if (cs->target->print != NULL) {
- cs->target->print(NULL, cs->target->t,
+ cs->target->print(&cs->fw, cs->target->t,
format & FMT_NUMERIC);
}
}