summaryrefslogtreecommitdiff
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2009-10-11 07:44:45 +0400
committerDavid S. Miller <davem@davemloft.net>2009-10-12 10:41:08 +0400
commite7db38c38fe8df1d890ae772737e27308bdc5956 (patch)
treef9af81ca780ad29207c38728dba27883b36bb1d5 /net/ipv6/sit.c
parente0c93948154328e13b4c0b0502d66af93f0fdfc4 (diff)
downloadlinux-e7db38c38fe8df1d890ae772737e27308bdc5956.tar.xz
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 <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c4
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)
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);