[quagga-dev 5471] zebra and linkdetect behaviour

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Thu Jun 5 22:24:34 BST 2008


I am trying to get zebra to obey link detect itself, rather than just
notifying ospf and such about changes.

My idea is that if zebra is used to manage static routes, it would be
nice if it would remove static routes when an interface goes down and
add them back when it comes back up.  At the moment it doesn't do this.

I got it to mostly work by changing a three cases of if_is_up to
if_is_operative in zebra_rib.c

Unfortunately it seems the netlink interface in zebra has some race
conditions, since if I unplug one link and plug in another at the same
time, I can end up with an invalid routing table.  It appears as if
zebra determins which route entry to remove and then removes it except
another route is inserted between finding the entry and removing it and
the wrong entry ends up being removed.

Another odd behaviour is that if I define a route only for one
interface, it seems to be added and removed OK, and if I define the
route for two interfaces with the same distance value, they get added
and removed OK too, with multipath routing, and any that goes down is
marked dead while down.  If I use different distance values however, it
only adds the route with the shortest distance (as expected), but when
that link goes down it removes the route but does not add the alternate
route with the higher distance and it does not add the route back when
the link comes back either.  Doing ifconfig down and up however brings
them back.  Changing just the RUNNING flag does not which I find rather
odd.

Perhaps someone has a clue why this would be going on.

I am using with 0.99.9 by the way.

-- 
Len Sorensen



More information about the Quagga-dev mailing list