Hello.

I am currently trying to get route leaking to work on Linux with bird.

I have several VRFs and want to leak some of the routes from one VRF into an other. For this I have several routing tables in bird, one kernel protocol per table and pipe protocols to leak to routes between the tables. This works as intended.
However I have a problem when exporting my leaked routes to the kernel.

I get the log message

May 16 15:28:24 host-1 bird[7349]: kernel4: 0.0.0.0/0: reinstalling
May 16 15:28:24 host-1 bird[7349]: Netlink: Invalid argument
May 16 15:28:24 host-1 bird[7349]: kernel4: 172.21.0.1/32: reinstalling
May 16 15:28:24 host-1 bird[7349]: Netlink: Invalid argument

Those 2 routes are not installed into the corresponding kernel routing table. These are exactly the routes that have the Kernel.prefsrc/krt_prefsrc attribute set. If I try to install these routes manually with all the attributes they have in the bird routing table I get the error

> root@host-1:~# ip r add table 5 0.0.0.0/0 via 172.21.0.1 dev vlan-uplink-1 metric 1024 src 172.21.0.153
> Error: Invalid prefsrc address.

This is because the IP address that is used here comes from an other VRF where it is available however it is not available in the VRF I am trying to install it.
(I also don't need the prefsrc option to where the route is installed.)
If I add the route to the Linux FIB without the prefsrc value or with an IP address that is available in the corresponding VRF, then it works out as intended. A workaround that I found is to set the krt_prefsrc attribute on export to something that is available in the target VRF. However it would be nicer to simply remove the attribute.
So is it possible to remove an attribute from a route in bird?

Greetings
Jo

Reply via email to