We are ready to update to BIRD 2.15.1 bugfix release and switch to Netlink as all supported FreeBSD versions already have Netlink. 1. Port was updated to the most recent version. 2. Extra patches for netlink headers created (see bug 277618). 3. The default flavour of the port is now "netlink", "base" flavor is still available as bird2-rtsock.
Created attachment 249408 [details] Update patch
Created attachment 249414 [details] reworked upgrade patch Let's allow upgrades of the bird2 package. Now it will switch to Netlink flavour gracefully.
Maybe we should switch to netlink flavor as default only on FreeBSD 14.0 and higher since FreeBSD 13 has no netlink in kernel, so kldmodule has to loaded. It can break users configs. I will rework the patch later tonight.
On Fri Mar 22 17:09:07 2024 UTC, zarychtam@plan-b.pwste.edu.pl wrote: > Maybe we should switch to netlink flavor as default only on FreeBSD 14.0 and > higher since FreeBSD 13 has no netlink in kernel, so kldmodule has to loaded. It > can break users configs. I will rework the patch later tonight. If you ask me, I would support this decision. Given that Alexander melifaro@ has little time to support NetLink, the burden falls on me. I'd prefer to be responsible for stable/14 only. In general I have very conservative approach to stable branches, especially ex-stable. I won't add NetLink to stable/13 in the first place, if I was to decide.
(In reply to Gleb Smirnoff from comment #4) >If you ask me, I would support this decision. Given that Alexander melifaro@ >has little time to support NetLink, the burden falls on me. I'd prefer to be >responsible for stable/14 only. In general I have very conservative approach >to stable branches, especially ex-stable. I won't add NetLink to stable/13 >in the first place, if I was to decide. Thank you for commenting on this, it gives valuable insight. Perhaps we should switch to netlink as the default flavor but only on FreeBSD 14.0 and later since the whole network stack seems to be fully netlink-oriented there and leave FreeBSD 13 as is - with its old rtsock defaults.
Created attachment 249418 [details] corrected update patch
Created attachment 249424 [details] corrected rearranged patch Rearranged Makefile to improve readability. No functional changes to the previous patch. Summary: - Port was updated to the most recent version. - Extra patches for fixing netlink headers were prepared (see PR 277618). - The default flavor of the port for FreeBSD 14.0 and later is now "netlink". The "base" flavor is still available as bird2-rtsock. There is no change for FreeBSD versions < 14.0. Here we still use "base" (rtsock driven version) as a default flavor. Changelog: https://bird.network.cz/pipermail/bird-users/2024-March/017468.html https://bird.network.cz/pipermail/bird-users/2024-March/017517.html PR: 277891
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8a57d5eba5e5ff34f3ecd19065373252c42f1300 commit 8a57d5eba5e5ff34f3ecd19065373252c42f1300 Author: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> AuthorDate: 2024-03-23 08:05:16 +0000 Commit: Olivier Cochard <olivier@FreeBSD.org> CommitDate: 2024-03-26 10:32:40 +0000 net/bird2: update 2.14 -> 2.15.1 - Port was updated to the most recent version. - Extra patches for fixing netlink headers were prepared (see PR 277618). - The default flavor of the port for FreeBSD 14.0 and later is now "netlink". The rtsock flavor is still available as bird2-rtsock. There is no change for FreeBSD versions < 14.0. Here we still use rtsock as a default flavor. Changelog: https://bird.network.cz/pipermail/bird-users/2024-March/017468.html https://bird.network.cz/pipermail/bird-users/2024-March/017517.html PR: 277891 UPDATING | 7 + net/bird2/Makefile | 18 +- net/bird2/distinfo | 6 +- .../patch-sysdep_bsd-netlink_netlink-route.h (new) | 370 +++++++++++++++++++++ .../patch-sysdep_bsd-netlink_netlink-sys.h (new) | 10 + 5 files changed, 404 insertions(+), 7 deletions(-)
Thanks for your great patch. I’ve just changed the flavor "base" to "rtsock" and add an entry in UPDATING because I don’t think we could use MOVED (because only impacting FreeBSD >= 14.0)
(In reply to Olivier Cochard from comment #9) Thank you for testing, refactoring and committing!
Before opening a new PR for the same problem... Wouldn't it maybe be an idea to have something like: if `uname -U` < 1400000; then kldload netlink fi ...in the rc.script? I have 6 identical systems with 1 being behaving inconsistant. Then at the next location of many all over sudden 6 out of 6 failing. `kldload netlink` solved (or avoided) the problem. But I wouldn't be surprised I'm not the only suffering this problem.
(In reply to Leo Vandewoestijne from comment #11) For FreeBSD < 14 default flavor is rtsock based and it doesn't require loading netlink.ko module. If someone is installing netlink flavor, then either building kernel with "options NETLINK" or loading netlink.ko is necessary.
(In reply to Marek Zarychta from comment #12) I did a kernel upgrade routine from -p9 to -p11. After booting, I've upgraded bird2. Then suddenly bird doesn't start on boot: Apr 17 19:04:17 *** bird[40557]: Unable to open rtnetlink socket: Address family not supported by protocol family OSVERSION says 1302001, but despite I clearly still must load the netlink module. Indeed bird2-netlink was installed (automagically). But the exact cause of that is unclear to me - I can only guess it then might be my custom kernel. Now "knowing the problem, is half the solution", so luckaly I found this closed ticket relative quick. And so I'm all fine now. But with that same credo I just want to report this event, to prevent unpleasant surprises and stress to other bird users.
Created attachment 250037 [details] patch with bandaid for setups that transitioned to netlink unintentionally We can load the Netlink module behind the scenes. It shouldn't harm those running rtsock-driven flavour of the daemon. It will be silently ignored if the module is unavailable or loaded. Along with this change, I added a bit of spam to the startup script to give users an idea about route lookup algorithms that can be used. This part of the patch can be deleted if the maintainer has a different opinion on the matter.
(In reply to Leo Vandewoestijne from comment #13) >OSVERSION says 1302001, but despite I clearly still must load the netlink module. >Indeed bird2-netlink was installed (automagically). But the exact cause of that is >unclear to me - I can only guess it then might be my custom kernel. I have heard of similar breakages and helped to troubleshoot one on IRC. In the case of upgrading bird2 by building directly from the ports tree, such a situation could happen on FreeBSD 13. Since the network stack is in transition toward widened netlink(4) deployment, we should probably load this module to avoid troubles like those described in comment #13.
The upgrade patch was committed, and that was really what this PR was about. If there is real breakage due to this update, then probably a new PR should be submitted.