While trying to reproduce the issue found on the BIRD-users mailing list[1], I refreshed my old BIRD testing setup and can confirm that net/bird2@netlink cannot cope with FIBs other than 0. Minimal steps to reproduce: 1. Increase sysctl net.fibs to at least 5 2. Deploy net/bird2@netlink with "protocol kernel" using not default FIB, for example: protocol kernel { kernel table 4; (...) } I can provide a more advanced config to reproduce, if someone is willing to do so, please email me. 1. https://bird.network.cz/pipermail/bird-users/2024-June/017722.html
I have to add that routes are always installed in FIB 0 regardless of protocol kernel { kernel table # } setting.
Created attachment 251422 [details] Regression test shell script Here is a shell script to reproduce quickly the bug. Tested on a -current: - Works with bird2-rtsock-2.15.1 - Fails with bird2-2.15.1
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f34aca55adef1e28cd68b2e6705a0cac03f0238e commit f34aca55adef1e28cd68b2e6705a0cac03f0238e Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-06-20 23:10:39 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-06-20 23:10:39 +0000 netlink/route: provide pre-2.6.19 Linux compat shim The old Linux used 8-bit rtm_table field of the RTM_NEWROUTE message to specify routing table id. Modern netlink uses RTA_TABLE 32-bit attribute. Unfortunately, there is modern software (namely bird) that would prefer the old API as long as the routing table id fits into 8-bit. PR: 279662 sys/netlink/route/rt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Thank you for fixing the issue with net/bird2@netlink. I can confirm that on stable/14 with commit f34aca55adef1e28cd68b2e6705a0cac03f0238e applied the problem has gone.
This should be safe to MFC. Open now to track it.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=df7001bad09474da00885ed853bc6708019fb292 commit df7001bad09474da00885ed853bc6708019fb292 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-06-20 23:10:39 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-06-25 12:47:24 +0000 netlink/route: provide pre-2.6.19 Linux compat shim The old Linux used 8-bit rtm_table field of the RTM_NEWROUTE message to specify routing table id. Modern netlink uses RTA_TABLE 32-bit attribute. Unfortunately, there is modern software (namely bird) that would prefer the old API as long as the routing table id fits into 8-bit. PR: 279662 (cherry picked from commit f34aca55adef1e28cd68b2e6705a0cac03f0238e) sys/netlink/route/rt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Does nlf_get_u8() extract the correct byte of the 32bit table identifier on big endian architectures?