lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <201003261834.o2QIYUhQ009920@94.43.138.210.xn.2iij.net> Date: Sat, 27 Mar 2010 03:34:30 +0900 From: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org> To: davem@...emloft.net CC: yoshfuji@...ux-ipv6.org, netdev@...r.kernel.org Subject: [PATCH net-next-2.6] sctp: Use ipv6_addr_diff() in sctp_v6_addr_match_len(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org> --- net/sctp/ipv6.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 240dceb..216d88f 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -276,20 +276,7 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, static inline int sctp_v6_addr_match_len(union sctp_addr *s1, union sctp_addr *s2) { - struct in6_addr *a1 = &s1->v6.sin6_addr; - struct in6_addr *a2 = &s2->v6.sin6_addr; - int i, j; - - for (i = 0; i < 4 ; i++) { - __be32 a1xora2; - - a1xora2 = a1->s6_addr32[i] ^ a2->s6_addr32[i]; - - if ((j = fls(ntohl(a1xora2)))) - return (i * 32 + 32 - j); - } - - return (i*32); + return ipv6_addr_diff(&s1->v6.sin6_addr, &s2->v6.sin6_addr); } /* Fills in the source address(saddr) based on the destination address(daddr) -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists