netfilter: Convert FWINV<[foo]> macros and uses to NF_INVF
[cascardo/linux.git] / net / ipv6 / netfilter / ip6_tables.c
index 63e06c3..61ed950 100644 (file)
@@ -73,22 +73,22 @@ ip6_packet_match(const struct sk_buff *skb,
        unsigned long ret;
        const struct ipv6hdr *ipv6 = ipv6_hdr(skb);
 
-#define FWINV(bool, invflg) ((bool) ^ !!(ip6info->invflags & (invflg)))
-
-       if (FWINV(ipv6_masked_addr_cmp(&ipv6->saddr, &ip6info->smsk,
-                                      &ip6info->src), IP6T_INV_SRCIP) ||
-           FWINV(ipv6_masked_addr_cmp(&ipv6->daddr, &ip6info->dmsk,
-                                      &ip6info->dst), IP6T_INV_DSTIP))
+       if (NF_INVF(ip6info, IP6T_INV_SRCIP,
+                   ipv6_masked_addr_cmp(&ipv6->saddr, &ip6info->smsk,
+                                        &ip6info->src)) ||
+           NF_INVF(ip6info, IP6T_INV_DSTIP,
+                   ipv6_masked_addr_cmp(&ipv6->daddr, &ip6info->dmsk,
+                                        &ip6info->dst)))
                return false;
 
        ret = ifname_compare_aligned(indev, ip6info->iniface, ip6info->iniface_mask);
 
-       if (FWINV(ret != 0, IP6T_INV_VIA_IN))
+       if (NF_INVF(ip6info, IP6T_INV_VIA_IN, ret != 0))
                return false;
 
        ret = ifname_compare_aligned(outdev, ip6info->outiface, ip6info->outiface_mask);
 
-       if (FWINV(ret != 0, IP6T_INV_VIA_OUT))
+       if (NF_INVF(ip6info, IP6T_INV_VIA_OUT, ret != 0))
                return false;
 
 /* ... might want to do something with class and flowlabel here ... */