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

[draft] linux support #28

Closed
wants to merge 12 commits into from
Closed

Conversation

kaniini
Copy link
Contributor

@kaniini kaniini commented Feb 6, 2022

This is the base support for installing and removing Linux kernel routes using OpenBGPD. Most things are working, e.g. bgpctl fib couple will behave as expected for the primary routing table.

What is not implemented at the moment

MPLS support

I do not personally use MPLS, so I have no way of testing it in a practical way, and the Linux MPLS support is still quite new, so I haven't bothered to implement MPLS yet. Somebody who knows more about MPLS on Linux is of course welcome to contribute the backend stuff, I will try to review it to the best of my ability.

Connected interface detection (e.g. kif_... routines)

This is relatively straightforward to do, just need to send the appropriate RTM_GETLINK messages to the routing socket, and wait for the replies back.

Dynamic networks

I am not really certain of the usecase of this on OpenBSD, so I have not given it much thought yet.

Multiple routing tables

This is trivial to add, the main problem is adjusting ktable_exists function. Linux has 4096 route tables per network namespace, and they are always present, but I am not sure if ktable_exists implies just basic existence of a route table, or actual configuration of one. The rest of the code is basically aware of multiple routing tables.

@cjeker
Copy link
Member

cjeker commented Feb 25, 2022

@kaniini, is this branch ready or do you still want to implement a few more things?

@kaniini
Copy link
Contributor Author

kaniini commented Feb 27, 2022

hi Claudio, i’m using it in production, we can do the connected interface detection as a second PR if that’s alright :)

@cjeker
Copy link
Member

cjeker commented Feb 28, 2022

Sound like a good plan. I will look over it again and merge it.

@cjeker
Copy link
Member

cjeker commented Feb 28, 2022

How does the initial sync of the routing table work?
In OpenBSD we have fetchtable() and fetchifs() to do this.
I did not see anything like this in the linux version. The nexthop validation depends on this to work properly. In a larger setup where e.g. OSPF adds routes for all loopback addresses used by BGP.

@kaniini
Copy link
Contributor Author

kaniini commented Feb 28, 2022

Nexthop validation is still stubbed, I can add it though.

@cjeker
Copy link
Member

cjeker commented Mar 1, 2022

Moving away form the stub nexthop validation is for sure needed for proper operation.
But I decided that I will merge this into the tree so we can work on it in tree.

@cjeker
Copy link
Member

cjeker commented Mar 1, 2022

Rebased and merged in d66bc87

@cjeker cjeker closed this Mar 1, 2022
@kaniini
Copy link
Contributor Author

kaniini commented Mar 1, 2022

Sounds great!

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

Successfully merging this pull request may close these issues.

None yet

2 participants