diff options
| -rw-r--r-- | 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 240dceba06e5..216d88f27236 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, | |||
| 276 | static inline int sctp_v6_addr_match_len(union sctp_addr *s1, | 276 | static inline int sctp_v6_addr_match_len(union sctp_addr *s1, | 
| 277 | union sctp_addr *s2) | 277 | union sctp_addr *s2) | 
| 278 | { | 278 | { | 
| 279 | struct in6_addr *a1 = &s1->v6.sin6_addr; | 279 | return ipv6_addr_diff(&s1->v6.sin6_addr, &s2->v6.sin6_addr); | 
| 280 | struct in6_addr *a2 = &s2->v6.sin6_addr; | ||
| 281 | int i, j; | ||
| 282 | |||
| 283 | for (i = 0; i < 4 ; i++) { | ||
| 284 | __be32 a1xora2; | ||
| 285 | |||
| 286 | a1xora2 = a1->s6_addr32[i] ^ a2->s6_addr32[i]; | ||
| 287 | |||
| 288 | if ((j = fls(ntohl(a1xora2)))) | ||
| 289 | return (i * 32 + 32 - j); | ||
| 290 | } | ||
| 291 | |||
| 292 | return (i*32); | ||
| 293 | } | 280 | } | 
| 294 | 281 | ||
| 295 | /* Fills in the source address(saddr) based on the destination address(daddr) | 282 | /* Fills in the source address(saddr) based on the destination address(daddr) | 
