]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Recognize site scope for IPv4 addresses (prefixes reserved for private
authorMartin Mares <mj@ucw.cz>
Tue, 27 Apr 1999 16:03:17 +0000 (16:03 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 27 Apr 1999 16:03:17 +0000 (16:03 +0000)
networks).

Removed old #ifndef logic which was used to avoid IPv4/IPv6 clashes
before conditionals in Modules lists were introduced.

TODO
lib/ipv4.c

diff --git a/TODO b/TODO
index 87eb4cbc10685d1369724ad2845c51956d18cfcd..f001bd4b59ad1c112874f477af0c4668b0eae4aa 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,6 +2,8 @@ Core
 ~~~~
 * protocols: implement dumping of protocol-dependent rte attributes
 
+- io.c: refuse old-style multicasts for unnumbered interfaces?
+
 - prefer loopback addresses as router IDs (dummy interface?)
 
 - config: executable config files
index 04e15b0534b1c658a83db5bd282e70ed1a8c18e1..186b36a837cefc024de80448873554cb2440e546 100644 (file)
@@ -6,8 +6,6 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#ifndef IPV6
-
 #include <string.h>
 #include <stdlib.h>
 
@@ -24,6 +22,10 @@ ipv4_classify(u32 a)
     {
       if (b == 0x7f)
        return IADDR_HOST | SCOPE_HOST;
+      else if (b == 0x0a ||
+              (a & 0xffff0000) == 0xc0a80000 ||
+              (a & 0xfff00000) == 0xac100000)
+       return IADDR_HOST | SCOPE_SITE;
       else
        return IADDR_HOST | SCOPE_UNIVERSE;
     }
@@ -92,5 +94,3 @@ ip_pton(char *a, ip_addr *o)
   *o = ipa_from_u32(ia);
   return 1;
 }
-
-#endif