Setting ONLINK flag for arbitrary routes

Toke Høiland-Jørgensen toke at toke.dk
Mon Apr 30 00:57:33 CEST 2018



On 30 April 2018 00:27:43 CEST, Ondrej Zajicek <santiago at crfreenet.org> wrote:
>On Sun, Apr 29, 2018 at 10:54:06PM +0200, Toke Høiland-Jørgensen wrote:
>> Hi
>> 
>> Is it possible to set the ONLINK flag for arbitrary routes?
>> 
>> The use case is a common setup in mesh networks: All devices have a
>/32
>> assigned to the interface and advertise this as the nexthop for v4
>> routes. The routing protocol then installs all kernel routes as
>onlink,
>> allowing routes to be installed even though the nexthop is not in the
>> same subnet as the local link address.
>> 
>> Is this possible to configure in Bird currently?
>
>Hi
>
>Onlink flag cannot be set in filters, it can be set by protocol code
>(currently done by Static and Kernel). Generally protocols are expected
>to validate next hop address by neigh_find2() before a route is
>propagated to nest. Babel does not do that, probably because of its
>beginning as IPv6-only implementation (which uses link-local
>addresses).
>
>It cannot be done currently, but it could be done by a simple patch, as
>most of infrastructure is here. See proto/static/static.c file for
>onlink
>handling.

Ah, right, doing it in the protocol code would be easier. Will look into that and send a patch, thanks!

-Toke



More information about the Bird-users mailing list