Activate back learning from user-defined routes in kernel protocol?

Benjamin Cama benoar at dolka.fr
Sun Aug 14 00:06:47 CEST 2011


Hi,

I am currently evaluating BIRD, and stumbled on some difficulty, which
looks quite similar to the one encountered by Łukasz here:
http://www.mail-archive.com/bird-users@atrey.karlin.mff.cuni.cz/msg01039.html

In my case, it's l2tpns [1] that generates additional routes on a tun
interface, and that get ignored by BIRD.

As Ondrej showed, the reason why BIRD does that is because Linux IPv6
supposedly don't distinguish between “native” device routes and user
defined one. And, as the comment tells us, the best way to fix that is
to set the protocol on the added routes to something correct when adding
them (which wouldn't be static in my case, but rather something else
like “l2tp” on a custom proto #). I'm working on patching l2tpns to do
that.

Still, I wondered why this comment was here, because on my linux 3.0
box, “native” routes are actually set as “proto kernel”. I tested on a
2.6.32, and it's also the case. But no luck on a 2.6.26.

So, I searched in the kernel git, and found the culprit : commit
4f72427998b105392e60bae7a6798a0c96fe4f0a which can be viewed here
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f72427998b105392e60bae7a6798a0c96fe4f0a
This dates back to may 2009, and coincidentally was done to please
quagga ;-) And it appeared juste before 2.6.30.

On the BIRD side, it's commit ff2857b03db854f99902766ad842aaa5fa29ec3c
that included the workaround to ignore all PROTO_BOOT routes. See here
https://git.nic.cz/redmine/projects/bird/repository/revisions/ff2857b03db854f99902766ad842aaa5fa29ec3c
And it actually happened after the kernel charge, in february 2010!

So, I was wondering if you would consider getting back to the “old”
behavior of not ignoring PROTO_BOOT routes on kernel >= 2.6.30? It would
be quite a change, still, and it may look strange that BIRD behave
differently on kernel before and after 2.6.30. But it would help people
like me who struggled to get their routes taken into account, just to
find after a painful search that it's because of a kernel “bug”.

I don't know what's the right answer to this, but I wanted to inform you
of this change in Linux's behavior, in case you didn't notice it.

Regard,
Benjamin

[1] http://sourceforge.net/projects/l2tpns/




More information about the Bird-users mailing list