]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/addrconf.c
Pull acpi_os_free into release branch
[linux-2.6-omap-h63xx.git] / net / ipv6 / addrconf.c
index c2c26fa0943df9e8e7a3e107ffec095c9b08c003..c250d0af10d77c3fc76f90a842da7414d1b2ed1e 100644 (file)
@@ -40,7 +40,6 @@
  *                                             status etc.
  */
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -862,6 +861,8 @@ static int inline ipv6_saddr_label(const struct in6_addr *addr, int type)
   *    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 +870,12 @@ static int inline ipv6_saddr_label(const struct in6_addr *addr, int type)
                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;
 }
 
@@ -1069,6 +1074,9 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
                                if (hiscore.attrs & IPV6_SADDR_SCORE_PRIVACY)
                                        continue;
                        }
+#else
+                       if (hiscore.rule < 7)
+                               hiscore.rule++;
 #endif
                        /* Rule 8: Use longest matching prefix */
                        if (hiscore.rule < 8) {