netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address.
@ 2009-10-11 13:44 YOSHIFUJI Hideaki
  2009-10-12  9:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki @ 2009-10-11 13:44 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji

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>
---
 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 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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address.
  2009-10-11 13:44 [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address YOSHIFUJI Hideaki
@ 2009-10-12  9:08 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-12  9:08 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Sun, 11 Oct 2009 22:44:45 +0900

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-12  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-11 13:44 [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address YOSHIFUJI Hideaki
2009-10-12  9:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).