Summary: | net/bird2@netlink - broken multiple FIB support | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Marek Zarychta <zarychtam> | ||||
Component: | kern | Assignee: | Gleb Smirnoff <glebius> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | crest, glebius, olivier, zlei | ||||
Priority: | --- | Flags: | zlei:
mfc-stable14+
|
||||
Version: | 14.0-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Marek Zarychta
2024-06-11 04:52:15 UTC
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? |