Skip to contentSkip to conversation

ipv6 sit: Fix 6rd relay address.

PATCH New YOSHIFUJI Hideaki (吉藤 英明) 1 participant 1 message Oct 11, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 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.

---
 net/ipv6/sit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/ipv6/sit.c +2 -2
index 8594451..193d0c6 100644
@@ -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);
Signature · 1 line
1.5.6.5