Next-hop check not needed?

Ondrej Zajicek santiago at crfreenet.org
Tue Jul 4 14:49:28 CEST 2017


On Thu, Jun 29, 2017 at 02:56:17PM +0200, Vincent Bernat wrote:
>  ❦ 29 juin 2017 11:02 +0200, Vincent Bernat <bernat at luffy.cx> :
> 
> >> On the next pass, BIRD doesn't recognize it (KRT: Received route
> >> 203.0.113.10/32 with strange next-hop 203.0.113.1) and tries to install
> >> it again but it already exists (Netlink: File exists). I'll dig more to
> >> find a workaround.
> >
> > I didn't find any work-around, so I made this patch instead. Works for
> > me.

Hi

The patch looks fine, but there is one conceptual problem - onlink flag
is not really property of a route, but property of a next hop, so your
patch is incompatible with ECMP. Unfortunately, we currently do not have
similar flexile attribute mechanism for per-next-hop data.

As nexthop handling has some significant changes between 1.6.x and 2.0,
we will fix this for 2.0 internally (some flag in next hop struct) and
keep the current behavior for 1.6.x .

> It doesn't replace an existing route when the flag is just flipped. I
> don't know what's the best way to do that.

It is possible that this is a limitation in BIRD that it does not check
for change of other attributes during periodic scans, it checks only
destinations and next hops (see krt_got_route(), krt_same_dest()).
OTOH, asynchronous updates should be processed properly.

-- 
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