]> granicus.if.org Git - ipset/commitdiff
netfilter ipset: Use ipv6_addr_equal() where appropriate.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Sat, 6 Apr 2013 12:10:06 +0000 (14:10 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 9 Apr 2013 19:42:16 +0000 (21:42 +0200)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_hash_ip.c
kernel/net/netfilter/ipset/ip_set_hash_ipport.c
kernel/net/netfilter/ipset/ip_set_hash_ipportip.c
kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c
kernel/net/netfilter/ipset/ip_set_hash_net.c
kernel/net/netfilter/ipset/ip_set_hash_netiface.c
kernel/net/netfilter/ipset/ip_set_hash_netport.c

index 5c0b78528e55b1af2288aa2e1a398202131413d5..b7d4cb475ae69ab088e33eef7589d06da81851e0 100644 (file)
@@ -234,7 +234,7 @@ hash_ip6_data_equal(const struct hash_ip6_elem *ip1,
                    const struct hash_ip6_elem *ip2,
                    u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0;
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6);
 }
 
 static inline bool
index 6283351f4eebee920c2939613ff05676b16f91ad..d8f77bacae860a340803d0084ac1def86c1b3df2 100644 (file)
@@ -284,7 +284,7 @@ hash_ipport6_data_equal(const struct hash_ipport6_elem *ip1,
                        const struct hash_ipport6_elem *ip2,
                        u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
               ip1->port == ip2->port &&
               ip1->proto == ip2->proto;
 }
index 6a21271c8d5a9f5da822c9789d55b761924d6da5..1da1e955f38b0a2c212e259f6974c6e781e3a3e1 100644 (file)
@@ -294,8 +294,8 @@ hash_ipportip6_data_equal(const struct hash_ipportip6_elem *ip1,
                          const struct hash_ipportip6_elem *ip2,
                          u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
-              ipv6_addr_cmp(&ip1->ip2.in6, &ip2->ip2.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
+              ipv6_addr_equal(&ip1->ip2.in6, &ip2->ip2.in6) &&
               ip1->port == ip2->port &&
               ip1->proto == ip2->proto;
 }
index 270e7d054e76dfa12c1edbea1d3bcf63f339f4d1..10a30b4fc7dba7af7ad858c566791e982475436a 100644 (file)
@@ -397,8 +397,8 @@ hash_ipportnet6_data_equal(const struct hash_ipportnet6_elem *ip1,
                           const struct hash_ipportnet6_elem *ip2,
                           u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
-              ipv6_addr_cmp(&ip1->ip2.in6, &ip2->ip2.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
+              ipv6_addr_equal(&ip1->ip2.in6, &ip2->ip2.in6) &&
               ip1->cidr == ip2->cidr &&
               ip1->port == ip2->port &&
               ip1->proto == ip2->proto;
index 8658d40a8ecb33f3e4533df2f948ddca01da18ee..d6a59154d7104258d18335a39646fbf9e3b8f598 100644 (file)
@@ -295,7 +295,7 @@ hash_net6_data_equal(const struct hash_net6_elem *ip1,
                     const struct hash_net6_elem *ip2,
                     u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
               ip1->cidr == ip2->cidr;
 }
 
index 10942e6fb460a3c10d81235d8347f127a6014fa4..f2b0a3c30130ba66bc69fe24b39cb54cdbc0c77a 100644 (file)
@@ -480,7 +480,7 @@ hash_netiface6_data_equal(const struct hash_netiface6_elem *ip1,
                          const struct hash_netiface6_elem *ip2,
                          u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
               ip1->cidr == ip2->cidr &&
               (++*multi) &&
               ip1->physdev == ip2->physdev &&
index e5d942aebe94667e0cc8c69a3d4499808b1b1bd4..349deb672a2d4fd8303ab43bdb3f0207c9124e0d 100644 (file)
@@ -359,7 +359,7 @@ hash_netport6_data_equal(const struct hash_netport6_elem *ip1,
                         const struct hash_netport6_elem *ip2,
                         u32 *multi)
 {
-       return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 &&
+       return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
               ip1->port == ip2->port &&
               ip1->proto == ip2->proto &&
               ip1->cidr == ip2->cidr;