[PATCH v3] Babel: Replace internal route selection by bird's nest

Ondrej Zajicek santiago at crfreenet.org
Tue Jan 31 18:35:27 CET 2023


On Tue, Jan 31, 2023 at 12:38:25PM +0100, Toke Høiland-Jørgensen via Bird-users wrote:
> Daniel Gröber <dxld at darkboxed.org> writes:
> > This allows for filtering routes from specific interfaces and
> > neighbours. With the current internal route selection proto babel exports
> > only up to one route and an admin cannot do fine-grained filtering.
> >
> > To fix this we rip out the internal route selection entirely and put them
> > all into the bird's nest instead.
> 
> I like the idea of enabling route filtering of incoming routes!

Me too.

> > This appears to not actually be a breaking change as route announcement was
> > already based on which routes bird would send back to babel_rt_notify
> > filters shouldn't be able to tell the difference between a single and
> > multiple routes AFAIK.

> Can we be a bit more sure than "appears"? :)
> 
> Just to make sure I'm understanding correctly: this relies on the nest
> using babel_rte_better() to select the route with the lowest metric from
> all the ones we announce, right? And if there's no filter, functionality
> will be equivalent to before this patch?

There are some corner cases where the behavior may be different - e.g.,
if one has Babel and BGP with add-path enabled connected to one table,
then all Babel routes would be propagated with BGP. Or if you have a pipe
to another table that would filter best route but not others, then
protocols in other table will use non-best route. But these are rather
artificial cases

One can of worms would be ECMP. On one side, we get (local) ECMP for
almost no additional work (with kernel 'merge paths' option), on the
other side, we could not create regular ECMP routes (one route with
multiple next hops) like it is done in OSPF and RIP.


> Couple of comments on the code below:
> 
> > Changes in v3:
> >  - Subsume FIB_RESTART v2 patch: instead of restarting FIB iteration
> >    we keep lists of actions to perform after FIB iteration is finished.

Could this be a part of separate patch, applied after the primary change?
Doing it together rather complicates reviewing these changes, and there
may be different considerations for both changes.


-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."



More information about the Bird-users mailing list