From: Lukasz Stelmach <stlman@poczta.fm>
To: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Cc: netdev@vger.kernel.org, "Łukasz Stelmach" <steelman@post.pl>
Subject: Re: [patch] ipv6 source address selection in addrconf.c (2.6.17)
Date: Wed, 21 Jun 2006 18:05:43 +0200 [thread overview]
Message-ID: <44996E57.8010705@poczta.fm> (raw)
In-Reply-To: <20060622.001235.96410192.yoshfuji@linux-ipv6.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --- linux/net/ipv6/addrconf.c.orig 2006-06-21 11:41:22.000000000 +0200
+++ linux/net/ipv6/addrconf.c 2006-06-21 17:18:56.000000000 +0200
@@ -862,6 +862,8 @@ static int inline ipv6_saddr_label(const
* 2002::/16 2
* ::/96 3
* ::ffff:0:0/96 4
+ * fc00::/7 5
+ * 2001::/32 6
*/
if (type & IPV6_ADDR_LOOPBACK)
return 0;
@@ -869,8 +871,12 @@ static int inline ipv6_saddr_label(const
return 3;
else if (type & IPV6_ADDR_MAPPED)
return 4;
+ else if (addr->s6_addr32[0] == htonl(0x20010000))
+ return 6;
else if (addr->s6_addr16[0] == htons(0x2002))
return 2;
+ else if ((addr->s6_addr[0] & 0xfe) == 0xfc)
+ return 5;
return 1;
}
Two additional labels (RFC 3484, sec. 10.3) for IPv6 addreses
are defined to make a distinction between global unicast
addresses and Unique Local Addresses (fc00::/7, RFC 4193) and
Teredo (2001::/32, RFC 4380). It is necessary to avoid attempts
of connection that would either fail (eg. fec0:: to 2001:feed::)
or be sub-optimal (2001:0:: to 2001:feed::).
Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD4DBQFEmW0LNdzY8sm9K9wRAjVGAKCOS1MVIro3bJ6szHzuAzaXXNaq/gCY4jfO
timfJc6SmrygMer36Tdqzg==
=Qzch
-----END PGP SIGNATURE-----
--
Było mi bardzo miło. Czwarta pospolita klęska, [...]
>Łukasz< Już nie katolicka lecz złodziejska. (c)PP
----------------------------------------------------------------------
Zobacz nowosci salonu moto w Madrycie >>> http://link.interia.pl/f1961
next prev parent reply other threads:[~2006-06-21 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 21:38 ipv6 source address selection in addrconf.c (2.6.17) Lukasz Stelmach
2006-06-21 13:42 ` [patch] " Lukasz Stelmach
2006-06-21 15:12 ` YOSHIFUJI Hideaki / 吉藤英明
2006-06-21 16:05 ` Lukasz Stelmach [this message]
2006-06-21 22:57 ` Lukasz Stelmach
2006-06-22 0:26 ` YOSHIFUJI Hideaki / 吉藤英明
2006-06-22 11:04 ` Lukasz Stelmach
2006-06-21 14:02 ` YOSHIFUJI Hideaki / 吉藤英明
[not found] <20060622.011257.85558580.yoshfuji@linux-ipv6.org>
2006-06-22 8:39 ` [patch] " 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=44996E57.8010705@poczta.fm \
--to=stlman@poczta.fm \
--cc=netdev@vger.kernel.org \
--cc=steelman@post.pl \
--cc=yoshfuji@linux-ipv6.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).