From: YOSHIFUJI Hideaki / 吉藤英明 Date: Sun, 11 Oct 2009 03:44:45 +0000 (+0000) Subject: ipv6 sit: Fix 6rd relay address. X-Git-Tag: v2.6.33-rc1~388^2~847 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7db38c38fe8df1d890ae772737e27308bdc5956;p=profile%2Fivi%2Fkernel-x86-ivi.git ipv6 sit: Fix 6rd relay address. ipv6 sit: Fix 6rd relay address. Relay's address should be extracted from real IPv6 address instead of configured prefix. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 8594451..193d0c6 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) pbw0 = tunnel->ip6rd.prefixlen >> 5; pbi0 = tunnel->ip6rd.prefixlen & 0x1f; - d = (ntohl(tunnel->ip6rd.prefix.s6_addr32[pbw0]) << pbi0) >> + d = (ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >> tunnel->ip6rd.relay_prefixlen; pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen; if (pbi1 > 0) - d |= ntohl(tunnel->ip6rd.prefix.s6_addr32[pbw0 + 1]) >> + d |= ntohl(v6dst->s6_addr32[pbw0 + 1]) >> (32 - pbi1); dst = tunnel->ip6rd.relay_prefix | htonl(d);