Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c61a7d10efbd187ab9bb54871238ebd1dfcacd44
Commit:     c61a7d10efbd187ab9bb54871238ebd1dfcacd44
Parent:     0773192b0f8914222cd27e682c49f978a6c7860a
Author:     Dave Johnson <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 17:19:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 02:28:21 2007 -0700

    [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses.
    
    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 <[EMAIL PROTECTED]>
    Acked-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv6/addrconf_core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/addrconf_core.c b/net/ipv6/addrconf_core.c
index faaefb6..3f82e95 100644
--- a/net/ipv6/addrconf_core.c
+++ b/net/ipv6/addrconf_core.c
@@ -50,6 +50,9 @@ int __ipv6_addr_type(const struct in6_addr *addr)
        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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to