diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/sit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 8594451c747b..193d0c6c5ce2 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -569,12 +569,12 @@ __be32 try_6rd(struct in6_addr *v6dst, struct ip_tunnel *tunnel) | |||
569 | pbw0 = tunnel->ip6rd.prefixlen >> 5; | 569 | pbw0 = tunnel->ip6rd.prefixlen >> 5; |
570 | pbi0 = tunnel->ip6rd.prefixlen & 0x1f; | 570 | pbi0 = tunnel->ip6rd.prefixlen & 0x1f; |
571 | 571 | ||
572 | d = (ntohl(tunnel->ip6rd.prefix.s6_addr32[pbw0]) << pbi0) >> | 572 | d = (ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >> |
573 | tunnel->ip6rd.relay_prefixlen; | 573 | tunnel->ip6rd.relay_prefixlen; |
574 | 574 | ||
575 | pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen; | 575 | pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen; |
576 | if (pbi1 > 0) | 576 | if (pbi1 > 0) |
577 | d |= ntohl(tunnel->ip6rd.prefix.s6_addr32[pbw0 + 1]) >> | 577 | d |= ntohl(v6dst->s6_addr32[pbw0 + 1]) >> |
578 | (32 - pbi1); | 578 | (32 - pbi1); |
579 | 579 | ||
580 | dst = tunnel->ip6rd.relay_prefix | htonl(d); | 580 | dst = tunnel->ip6rd.relay_prefix | htonl(d); |