Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: fix loading kernel routes without netlink #16597

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

kprovost
Copy link

Commit 605df8d zebra: Use zebra dplane for RTM link and addr broke loading of kernel routes at startup for configurations without netlink.

It rearranged the startup sequence in zebra_ns_enable() to pass via zebra_ns_startup_continue(), triggered through zebra_dplane_startup_stage() calls. However, it neglected to make these calls in the non-netlink code path. As a result zebra failed to load kernel routes at startup on platforms such as FreeBSD.

Insert these calls so we run through all of the expected startup stages.

Commit 605df8d zebra: Use zebra dplane for RTM link and addr broke loading of
kernel routes at startup for configurations without netlink.

It rearranged the startup sequence in zebra_ns_enable() to pass via
zebra_ns_startup_continue(), triggered through zebra_dplane_startup_stage()
calls. However, it neglected to make these calls in the non-netlink code path.
As a result zebra failed to load kernel routes at startup on platforms such
as FreeBSD.

Insert these calls so we run through all of the expected startup stages.

Signed-off-by: Kristof Provost <[email protected]>
Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this

@Jafaral Jafaral changed the title zebra: fix loading kernel routs without netlink zebra: fix loading kernel routes without netlink Aug 19, 2024
@Jafaral Jafaral merged commit d9775c6 into FRRouting:master Aug 19, 2024
16 checks passed
@ocochard
Copy link
Contributor

Does it mean that FRR disable netlink on FreeBSD ? Because all supported versions of FreeBSD has netlink support.

@kprovost
Copy link
Author

FRR does not use netlink on FreeBSD, no.
It only enables netlink on Linux:

frr/configure.ac

Line 1350 in c32bdc2

AC_DEFINE([HAVE_NETLINK], [1], [netlink])

I've not investigated if FreeBSD supports everything that FRR needs via netlink.

@ocochard
Copy link
Contributor

has netlink support

The FRR code is very linux-only netlink:

./include/linux/netlink.h:5:10: fatal error: 'linux/kernel.h' file not found
    5 | #include <linux/kernel.h>

The bird patch was very small, but it will be a little more complex on frr.

@donaldsharp
Copy link
Member

it will be a lot more complex on frr. There are a bunch of netlink operations that do not exist yet for FreeBSD that are needed. Thus leaving us with a partial implementation that would need to be mixed and matched. I spent a couple hours looking at this and decided my time was spent better elsewhere for the moment.

@ocochard
Copy link
Contributor

it will be a lot more complex on frr. There are a bunch of netlink operations that do not exist yet for FreeBSD that are needed. Thus leaving us with a partial implementation that would need to be mixed and matched. I spent a couple hours looking at this and decided my time was spent better elsewhere for the moment.

Thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants