[PATCH v2] Lib: accept 240.0.0.0/4 as a valid range

James Oakley james at ttgi.io
Wed Mar 16 12:46:21 CET 2022


On Wednesday, March 16, 2022 7:24:22 AM ADT Neil Jerram wrote:
> FYI, and in as much as it constitutes a form of support for this, we at
> Project Calico made a similar change to our BIRD 1.6 fork with these
> commits.  (Of which the first is rather embarrassing...)
> https://github.com/projectcalico/bird/commit/5cc183424d9ffb898171ef16360c400
> 414f91bf0
> https://github.com/projectcalico/bird/commit/4c6f0ce840456cc04483a820007b43
> 3721706c07
> https://github.com/projectcalico/bird/commit/49d883ed225d8eb0310009a5a79b1c
> 9ee0afbca9
> 
> We went for SCOPE_SITE.

We have a similar patch for our 2.0.x builds. We chose SCOPE_SITE as well:

--- a/lib/ip.c
+++ b/lib/ip.c
@@ -103,6 +103,10 @@
   if (a == 0xffffffff)
     return IADDR_BROADCAST | SCOPE_LINK;
 
+  /* Allow use of 240.0.0.0/4 as a private range */
+  if (b >= 0xf0)
+    return IADDR_HOST | SCOPE_SITE;
+
   return IADDR_INVALID;
 }


-- 
James Oakley
james at ttgi.io




More information about the Bird-users mailing list