diff options
author | Giuseppe Longo <giuseppelng@gmail.com> | 2014-02-10 16:49:33 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-02-11 13:57:23 +0100 |
commit | 8877968858a8dd6b7ae096988d57a7511c81733d (patch) | |
tree | 4bbab073014c98f080ed93f819502a84c79a4c83 /iptables/nft-ipv6.c | |
parent | 7851975e5055381d30f0788d90671485695928e1 (diff) |
nft: adds save_matches_and_target
This patch permits to save matches and target for ip/ip6/arp/eb
family, required for xtables-events.
Also, generalizes nft_rule_print_save to be reused for all protocol
families.
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-ipv6.c')
-rw-r--r-- | iptables/nft-ipv6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index f30cec61..7c8b43fc 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -218,9 +218,10 @@ static void save_ipv6_addr(char letter, const struct in6_addr *addr, printf("%s-%c %s ", invert ? "! " : "", letter, addr_str); } -static uint8_t nft_ipv6_save_firewall(const struct iptables_command_state *cs, - unsigned int format) +static void nft_ipv6_save_firewall(const void *data, unsigned int format) { + const struct iptables_command_state *cs = data; + save_firewall_details(cs, cs->fw6.ipv6.invflags, cs->fw6.ipv6.proto, cs->fw6.ipv6.iniface, cs->fw6.ipv6.iniface_mask, cs->fw6.ipv6.outiface, cs->fw6.ipv6.outiface_mask, @@ -231,7 +232,8 @@ static uint8_t nft_ipv6_save_firewall(const struct iptables_command_state *cs, save_ipv6_addr('d', &cs->fw6.ipv6.dst, cs->fw6.ipv6.invflags & IPT_INV_DSTIP); - return cs->fw6.ipv6.flags; + save_matches_and_target(cs->matches, cs->target, + cs->jumpto, cs->fw6.ipv6.flags, &cs->fw6); } /* These are invalid numbers as upper layer protocol */ |