diff options
author | Giuseppe Longo <giuseppelng@gmail.com> | 2013-09-16 10:58:16 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:46 +0100 |
commit | 217f021925872dcbce4187408762845ae3f6f182 (patch) | |
tree | 0f89a883da3b034494f2dac6bbce964011ce5bdc /iptables/nft-ipv6.c | |
parent | 4c4bcbcd2523da740ed02021e51cb20b14fae153 (diff) |
xtables: nft-arp: implements is_same op for ARP family
The following patch implements the is_same operation
for ARP family needed for searching arp rule.
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 2efe95e3..3d35290f 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -49,9 +49,12 @@ static int nft_ipv6_add(struct nft_rule *r, void *data) return cs->fw6.ipv6.flags; } -static bool nft_ipv6_is_same(const struct iptables_command_state *a, - const struct iptables_command_state *b) +static bool nft_ipv6_is_same(const void *data_a, + const void *data_b) { + const struct iptables_command_state *a = data_a; + const struct iptables_command_state *b = data_b; + if (memcmp(a->fw6.ipv6.src.s6_addr, b->fw6.ipv6.src.s6_addr, sizeof(struct in6_addr)) != 0 || memcmp(a->fw6.ipv6.dst.s6_addr, b->fw6.ipv6.dst.s6_addr, |