diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-10 02:42:07 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-11 06:47:55 -0400 |
commit | caad295fed8b652c67159911d11c65d476351d2f (patch) | |
tree | a254d67f1b39ed6aa3f2bbbaf8fde049c1bd804b | |
parent | ff4e1fb0be7386e97580d50f09a804b33b58377a (diff) |
[IPV6]: Use ipv6_addr_equal() instead of !ipv6_addr_cmp().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
-rw-r--r-- | net/ipv6/addrconf.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 924158393d04..ed9938014cf9 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2951,7 +2951,7 @@ int ipv6_chk_home_addr(struct net *net, struct in6_addr *addr) | |||
2951 | for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) { | 2951 | for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) { |
2952 | if (!net_eq(dev_net(ifp->idev->dev), net)) | 2952 | if (!net_eq(dev_net(ifp->idev->dev), net)) |
2953 | continue; | 2953 | continue; |
2954 | if (ipv6_addr_cmp(&ifp->addr, addr) == 0 && | 2954 | if (ipv6_addr_equal(&ifp->addr, addr) && |
2955 | (ifp->flags & IFA_F_HOMEADDRESS)) { | 2955 | (ifp->flags & IFA_F_HOMEADDRESS)) { |
2956 | ret = 1; | 2956 | ret = 1; |
2957 | break; | 2957 | break; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 8ebf6de29562..80eab71e77ff 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -543,7 +543,7 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, | |||
543 | return NULL; | 543 | return NULL; |
544 | 544 | ||
545 | for (i = 0; i < tp->md5sig_info->entries6; i++) { | 545 | for (i = 0; i < tp->md5sig_info->entries6; i++) { |
546 | if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, addr) == 0) | 546 | if (ipv6_addr_equal(&tp->md5sig_info->keys6[i].addr, addr)) |
547 | return &tp->md5sig_info->keys6[i].base; | 547 | return &tp->md5sig_info->keys6[i].base; |
548 | } | 548 | } |
549 | return NULL; | 549 | return NULL; |
@@ -632,7 +632,7 @@ static int tcp_v6_md5_do_del(struct sock *sk, struct in6_addr *peer) | |||
632 | int i; | 632 | int i; |
633 | 633 | ||
634 | for (i = 0; i < tp->md5sig_info->entries6; i++) { | 634 | for (i = 0; i < tp->md5sig_info->entries6; i++) { |
635 | if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, peer) == 0) { | 635 | if (ipv6_addr_equal(&tp->md5sig_info->keys6[i].addr, peer)) { |
636 | /* Free the key */ | 636 | /* Free the key */ |
637 | kfree(tp->md5sig_info->keys6[i].base.key); | 637 | kfree(tp->md5sig_info->keys6[i].base.key); |
638 | tp->md5sig_info->entries6--; | 638 | tp->md5sig_info->entries6--; |