<div dir="ltr"><div><div>This change enables Bird to establish BGP sessions to devices in class E address space.<br></div></div><div><br></div><div>Without this change, prefixes in class e announced via BGP are unconditionally ignored, e.g:<br><br></div><div>   $ bird -d<br>   bird: Started<br>   bird: Ignoring bogus route <a href="http://241.1.2.3/32">241.1.2.3/32</a> received via <neighbor><br></div><div><br></div><div>After this change, if configuration flag --enable-class-e is provided, class E / bogons can still be ignored/filtered via routing policy but aren't otherwise explicitly marked as invalid.</div><div><br></div><div><div><div>Marking class E addresses as bogus was previously discussed in Sep 2017 with no patch and no proposed change of behaviour (<a href="https://bird.network.cz/pipermail/bird-users/2017-September/011558.html">https://bird.network.cz/pipermail/bird-users/2017-September/011558.html</a>).</div><div></div></div></div><div><br></div><div>Signed-off-by: lincoln dale <<a href="mailto:ltd@interlink.com.au">ltd@interlink.com.au</a>><br></div><div><br></div><div>---</div><div> diff --git a/<a href="http://configure.ac">configure.ac</a> b/<a href="http://configure.ac">configure.ac</a><br> index 40f021a..3f22fa5 100644<br> --- a/<a href="http://configure.ac">configure.ac</a><br> +++ b/<a href="http://configure.ac">configure.ac</a><br> @@ -48,6 +48,12 @@ AC_ARG_ENABLE([mpls-kernel],<br>    [enable_mpls_kernel=try]<br>  )<br>  <br> +AC_ARG_ENABLE([class-e],<br> +  [AS_HELP_STRING([--enable-class-e], [allow class E addresses to be used])],<br> +  [enable_class_e=yes],<br> +  [enable_class_e=no]<br> +)<br> +<br>  AC_ARG_WITH([protocols],<br>    [AS_HELP_STRING([--with-protocols=LIST], [include specified routing protocols @<:@all@:>@])],<br>    [],<br> @@ -391,6 +397,10 @@ if test "$enable_debug" = yes ; then<br>    fi<br>  fi<br>  <br> +if test "$enable_class_e" = yes ; then<br> +  AC_DEFINE([ENABLE_CLASS_E], [1], [Define to 1 to enable support for class E addresses.])<br> +fi<br> +<br>  CLIENT=birdcl<br>  CLIENT_LIBS=<br>  if test "$enable_client" = yes ; then<br> @@ -454,6 +464,7 @@ AC_MSG_RESULT([        Debugging:          $enable_debug])<br>  AC_MSG_RESULT([        POSIX threads:           $enable_pthreads])<br>  AC_MSG_RESULT([        Routing protocols:    $protocols])<br>  AC_MSG_RESULT([        Kernel MPLS support:        $enable_mpls_kernel])<br> +AC_MSG_RESULT([        Allow Class E addresses: $enable_class_e])<br>  AC_MSG_RESULT([        Client:                  $enable_client])<br>  <br>  rm -f $objdir/.*-stamp<br> diff --git a/lib/ip.c b/lib/ip.c<br> index 2d19516..143ef01 100644<br> --- a/lib/ip.c<br> +++ b/lib/ip.c<br> @@ -103,6 +103,12 @@ ip4_classify(ip4_addr ad)<br>    if (a == 0xffffffff)<br>      return IADDR_BROADCAST | SCOPE_LINK;<br>  <br> +#ifdef ENABLE_CLASS_E<br> +  /* consider class E to be valid */<br> +  if (b >= 0xf0)<br> +      return IADDR_HOST | SCOPE_UNIVERSE;<br> +#endif<br> +<br>    return IADDR_INVALID;<br>  }<br>  ---<br></div></div>