]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ipv6: Remove IPV6_ADDR_RESERVED
authorUlrich Weber <uweber@astaro.com>
Thu, 25 Feb 2010 23:28:58 +0000 (23:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Feb 2010 11:59:07 +0000 (03:59 -0800)
RFC 4291 section 2.4 states that all uncategorized addresses
should be considered as Global Unicast.

This will remove IPV6_ADDR_RESERVED completely
and return IPV6_ADDR_UNICAST in ipv6_addr_type() instead.

Signed-off-by: Ulrich Weber <uweber@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/addrconf.c
net/ipv6/addrconf_core.c
net/ipv6/route.c

index d067db1f88c7f73f7bb923115b0ec53eabf8ca41..e72fb10ce57348e82fcfd0bb36a1e641bde56cc5 100644 (file)
@@ -73,7 +73,6 @@
 #define IPV6_ADDR_SCOPE_MASK   0x00f0U
 
 #define IPV6_ADDR_MAPPED       0x1000U
-#define IPV6_ADDR_RESERVED     0x2000U /* reserved address space */
 
 /*
  *     Addr scopes
index 1b327f15e7e7ae7960ca8321875375673b67e385..88fd8c5877ee41495504dc57fbf174dc0c092cd4 100644 (file)
@@ -992,8 +992,7 @@ struct ipv6_saddr_dst {
 
 static inline int ipv6_saddr_preferred(int type)
 {
-       if (type & (IPV6_ADDR_MAPPED|IPV6_ADDR_COMPATv4|
-                   IPV6_ADDR_LOOPBACK|IPV6_ADDR_RESERVED))
+       if (type & (IPV6_ADDR_MAPPED|IPV6_ADDR_COMPATv4|IPV6_ADDR_LOOPBACK))
                return 1;
        return 0;
 }
index 3f82e9542edab8840b7b715cda58e6a719950459..6b03826552e14071ac268c55280d80a4b8e1797d 100644 (file)
@@ -72,7 +72,7 @@ int __ipv6_addr_type(const struct in6_addr *addr)
                                IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_GLOBAL));  /* addr-select 3.3 */
        }
 
-       return (IPV6_ADDR_RESERVED |
+       return (IPV6_ADDR_UNICAST |
                IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_GLOBAL));  /* addr-select 3.4 */
 }
 EXPORT_SYMBOL(__ipv6_addr_type);
index 88c0a5c49ae877d898eeadb537cf0251dc3f4218..b08879e97f22198c6400df2f85a70e377597cce9 100644 (file)
@@ -1873,7 +1873,7 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes)
        switch (ipstats_mib_noroutes) {
        case IPSTATS_MIB_INNOROUTES:
                type = ipv6_addr_type(&ipv6_hdr(skb)->daddr);
-               if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) {
+               if (type == IPV6_ADDR_ANY) {
                        IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst),
                                      IPSTATS_MIB_INADDRERRORS);
                        break;