diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-01-27 23:19:49 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:24 +0100 |
commit | c51b85f995caebd41e6d063c8bcab513b305bcaa (patch) | |
tree | 9e0af8d22a5093c34988867b0081e9330729cc00 /iptables/nft.c | |
parent | 18af813cabf7b574dec86beedf0a335e5928eaaa (diff) |
nft: fix crash if TRACE is used
And any other match and target with no save function defined.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r-- | iptables/nft.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables/nft.c b/iptables/nft.c index c3d5d610..445d8f92 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1006,7 +1006,8 @@ static void nft_match_save(struct nft_rule_expr *expr) printf("-m %s", match->name); /* FIXME missing parameter */ - match->save(NULL, emu); + if (match->save) + match->save(NULL, emu); printf(" "); @@ -1049,7 +1050,8 @@ static void nft_target_save(struct nft_rule_expr *expr) printf("-j %s", target->name); /* FIXME missing parameter */ - target->save(NULL, emu); + if (target->save) + target->save(NULL, emu); free(emu); } |