aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-29 07:49:03 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-29 22:58:40 -0500
commit29e3b1608c8dca3ae4224a26862d18ea003ccee6 (patch)
treef830a52bbf2eae7f6bbe9976ff8220d63df04a48 /net/netfilter
parentd9e85655b5c9fcebf81aedc69182efbfdf4fe740 (diff)
netfilter ipset: Use ipv6_addr_equal() where appropriate.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/ipset/ip_set_hash_ip.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_ipport.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_ipportip.c4
-rw-r--r--net/netfilter/ipset/ip_set_hash_ipportnet.c4
-rw-r--r--net/netfilter/ipset/ip_set_hash_net.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_netiface.c2
-rw-r--r--net/netfilter/ipset/ip_set_hash_netport.c2
7 files changed, 9 insertions, 9 deletions
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index 5c0b78528e55..b7d4cb475ae6 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -234,7 +234,7 @@ hash_ip6_data_equal(const struct hash_ip6_elem *ip1,
234 const struct hash_ip6_elem *ip2, 234 const struct hash_ip6_elem *ip2,
235 u32 *multi) 235 u32 *multi)
236{ 236{
237 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0; 237 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6);
238} 238}
239 239
240static inline bool 240static inline bool
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c b/net/netfilter/ipset/ip_set_hash_ipport.c
index 6283351f4eeb..d8f77bacae86 100644
--- a/net/netfilter/ipset/ip_set_hash_ipport.c
+++ b/net/netfilter/ipset/ip_set_hash_ipport.c
@@ -284,7 +284,7 @@ hash_ipport6_data_equal(const struct hash_ipport6_elem *ip1,
284 const struct hash_ipport6_elem *ip2, 284 const struct hash_ipport6_elem *ip2,
285 u32 *multi) 285 u32 *multi)
286{ 286{
287 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 287 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
288 ip1->port == ip2->port && 288 ip1->port == ip2->port &&
289 ip1->proto == ip2->proto; 289 ip1->proto == ip2->proto;
290} 290}
diff --git a/net/netfilter/ipset/ip_set_hash_ipportip.c b/net/netfilter/ipset/ip_set_hash_ipportip.c
index 6a21271c8d5a..1da1e955f38b 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportip.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportip.c
@@ -294,8 +294,8 @@ hash_ipportip6_data_equal(const struct hash_ipportip6_elem *ip1,
294 const struct hash_ipportip6_elem *ip2, 294 const struct hash_ipportip6_elem *ip2,
295 u32 *multi) 295 u32 *multi)
296{ 296{
297 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 297 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
298 ipv6_addr_cmp(&ip1->ip2.in6, &ip2->ip2.in6) == 0 && 298 ipv6_addr_equal(&ip1->ip2.in6, &ip2->ip2.in6) &&
299 ip1->port == ip2->port && 299 ip1->port == ip2->port &&
300 ip1->proto == ip2->proto; 300 ip1->proto == ip2->proto;
301} 301}
diff --git a/net/netfilter/ipset/ip_set_hash_ipportnet.c b/net/netfilter/ipset/ip_set_hash_ipportnet.c
index 2d5cd4ee30eb..f2627226a087 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportnet.c
@@ -388,8 +388,8 @@ hash_ipportnet6_data_equal(const struct hash_ipportnet6_elem *ip1,
388 const struct hash_ipportnet6_elem *ip2, 388 const struct hash_ipportnet6_elem *ip2,
389 u32 *multi) 389 u32 *multi)
390{ 390{
391 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 391 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
392 ipv6_addr_cmp(&ip1->ip2.in6, &ip2->ip2.in6) == 0 && 392 ipv6_addr_equal(&ip1->ip2.in6, &ip2->ip2.in6) &&
393 ip1->cidr == ip2->cidr && 393 ip1->cidr == ip2->cidr &&
394 ip1->port == ip2->port && 394 ip1->port == ip2->port &&
395 ip1->proto == ip2->proto; 395 ip1->proto == ip2->proto;
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c
index 29e94b981f3f..4b677cf6bf7d 100644
--- a/net/netfilter/ipset/ip_set_hash_net.c
+++ b/net/netfilter/ipset/ip_set_hash_net.c
@@ -286,7 +286,7 @@ hash_net6_data_equal(const struct hash_net6_elem *ip1,
286 const struct hash_net6_elem *ip2, 286 const struct hash_net6_elem *ip2,
287 u32 *multi) 287 u32 *multi)
288{ 288{
289 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 289 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
290 ip1->cidr == ip2->cidr; 290 ip1->cidr == ip2->cidr;
291} 291}
292 292
diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c
index 45a101439bc5..6ba985f1c96f 100644
--- a/net/netfilter/ipset/ip_set_hash_netiface.c
+++ b/net/netfilter/ipset/ip_set_hash_netiface.c
@@ -471,7 +471,7 @@ hash_netiface6_data_equal(const struct hash_netiface6_elem *ip1,
471 const struct hash_netiface6_elem *ip2, 471 const struct hash_netiface6_elem *ip2,
472 u32 *multi) 472 u32 *multi)
473{ 473{
474 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 474 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
475 ip1->cidr == ip2->cidr && 475 ip1->cidr == ip2->cidr &&
476 (++*multi) && 476 (++*multi) &&
477 ip1->physdev == ip2->physdev && 477 ip1->physdev == ip2->physdev &&
diff --git a/net/netfilter/ipset/ip_set_hash_netport.c b/net/netfilter/ipset/ip_set_hash_netport.c
index 7ef700de596c..af20c0c5ced2 100644
--- a/net/netfilter/ipset/ip_set_hash_netport.c
+++ b/net/netfilter/ipset/ip_set_hash_netport.c
@@ -350,7 +350,7 @@ hash_netport6_data_equal(const struct hash_netport6_elem *ip1,
350 const struct hash_netport6_elem *ip2, 350 const struct hash_netport6_elem *ip2,
351 u32 *multi) 351 u32 *multi)
352{ 352{
353 return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && 353 return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6) &&
354 ip1->port == ip2->port && 354 ip1->port == ip2->port &&
355 ip1->proto == ip2->proto && 355 ip1->proto == ip2->proto &&
356 ip1->cidr == ip2->cidr; 356 ip1->cidr == ip2->cidr;