From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org,
lksctp-developers@lists.sourceforge.net,
"Srinivas Akkipeddi" <sakkiped@starentnetworks.com>
Subject: [PATCH] IPv6: ipv6_addr_type() doesn't know about RFC4193 addresses
Date: Wed, 25 Jul 2007 19:49:09 -0400 [thread overview]
Message-ID: <18087.57717.495366.413571@zeus.sw.starentnetworks.com> (raw)
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) {
next reply other threads:[~2007-07-26 0:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 23:49 Dave Johnson [this message]
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
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=18087.57717.495366.413571@zeus.sw.starentnetworks.com \
--to=djohnson+linux-kernel@sw.starentnetworks.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=sakkiped@starentnetworks.com \
/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
Powered by JetHome