summaryrefslogtreecommitdiffstats
path: root/iptables/nft-ipv6.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-09-18 14:13:47 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-12-30 23:50:47 +0100
commite2a2c72277b49ac611809b3978365ab3010e1597 (patch)
tree299f55185b6a3a0af37060c521e1fc74f89be488 /iptables/nft-ipv6.c
parent217f021925872dcbce4187408762845ae3f6f182 (diff)
nft: consolidate nft_rule_find for ARP, IPv4 and IPv6
This patch kills nft_arp_rule_find, which is almost a copy and paste of the original nft_rule_find function. Refactor this function to move specific protocol parts to the corresponding nft-{ipv4,ipv6,arp}.c files. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-ipv6.c')
-rw-r--r--iptables/nft-ipv6.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c
index 3d35290f..dbb148ab 100644
--- a/iptables/nft-ipv6.c
+++ b/iptables/nft-ipv6.c
@@ -294,6 +294,14 @@ static void nft_ipv6_parse_target(struct xtables_target *t, void *data)
cs->target = t;
}
+static bool nft_ipv6_rule_find(struct nft_family_ops *ops,
+ struct nft_rule *r, void *data)
+{
+ struct iptables_command_state *cs = data;
+
+ return nft_ipv46_rule_find(ops, r, cs);
+}
+
struct nft_family_ops nft_family_ops_ipv6 = {
.add = nft_ipv6_add,
.is_same = nft_ipv6_is_same,
@@ -304,4 +312,5 @@ struct nft_family_ops nft_family_ops_ipv6 = {
.save_firewall = nft_ipv6_save_firewall,
.post_parse = nft_ipv6_post_parse,
.parse_target = nft_ipv6_parse_target,
+ .rule_find = nft_ipv6_rule_find,
};