netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPv6: ipv6_addr_type() doesn't know about RFC4193 addresses
@ 2007-07-25 23:49 Dave Johnson
  2007-07-26  0:12 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dave Johnson @ 2007-07-25 23:49 UTC (permalink / raw)
  To: netdev, davem; +Cc: linux-kernel, lksctp-developers, Srinivas Akkipeddi


ipv6_addr_type() doesn't check for 'Unique Local IPv6 Unicast
Addresses' (RFC4193) and returns IPV6_ADDR_RESERVED for that range.

SCTP uses this function and will fail bind() and connect() calls that
use RFC4193 addresses, SCTP will also ignore inbound connections from
RFC4193 addresses if listening on IPV6_ADDR_ANY.

There may be other users of ipv6_addr_type() that could also have
problems.

Signed-off-by: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
Cc: Srinivas Akkipeddi <sakkiped@starentnetworks.com>

===== net/ipv6/addrconf_core.c 1.2 vs edited =====
--- 1.2/net/ipv6/addrconf_core.c	2007-02-26 14:42:57 -05:00
+++ edited/net/ipv6/addrconf_core.c	2007-07-25 15:21:41 -04:00
@@ -50,6 +50,9 @@
 	if ((st & htonl(0xFFC00000)) == htonl(0xFEC00000))
 		return (IPV6_ADDR_SITELOCAL | IPV6_ADDR_UNICAST |
 			IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_SITELOCAL));		/* addr-select 3.1 */
+	if ((st & htonl(0xFE000000)) == htonl(0xFC000000))
+		return (IPV6_ADDR_UNICAST |
+			IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_GLOBAL));			/* RFC 4193 */
 
 	if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) {
 		if (addr->s6_addr32[2] == 0) {


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

end of thread, other threads:[~2007-07-31  0:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 23:49 [PATCH] IPv6: ipv6_addr_type() doesn't know about RFC4193 addresses Dave Johnson
2007-07-26  0:12 ` David Miller
2007-07-26  1:11   ` Dave Johnson
2007-07-26 17:59     ` [Lksctp-developers] " Vlad Yasevich
2007-07-26 18:37   ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-26 17:21 ` Simon Arlott
2007-07-26 18:00   ` Dave Johnson
2007-07-26 18:10     ` [Lksctp-developers] " Vlad Yasevich
2007-07-26 18:06   ` Rémi Denis-Courmont
2007-07-26 18:34 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-31  0:21   ` 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).