From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address.
Date: Sun, 11 Oct 2009 22:44:45 +0900 [thread overview]
Message-ID: <4AD1E14D.6030903@linux-ipv6.org> (raw)
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);
next reply other threads:[~2009-10-11 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 13:44 YOSHIFUJI Hideaki [this message]
2009-10-12 9:08 ` [RESED PATCH net-next-2.6 2/3] ipv6 sit: Fix 6rd relay address David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD1E14D.6030903@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).