-
Notifications
You must be signed in to change notification settings - Fork 86
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
internal/freebsd: add initial version of FreeBSD support #126
Conversation
3cc7f80
to
41ffc7e
Compare
49e5de5
to
0f75615
Compare
The second commit just slipped into this PR to make the CI pass |
Thanks for your work on this. I will try to spin up a VM to test amd64 in the next couple of days. Would it be possible to set up a FreeBSD case in https://github.com/WireGuard/wgctrl-go/blob/master/.cibuild.sh to configure a kernel device for use in CI? |
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
At least the FreeBSD kernel seems to return the AllowedIPs in a different order than the others. Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Yes, thats done in my latest commit. We are currently missing only some Go unit tests as I couldnt take those from the OpenBSD client. |
Oh no, the CI fails with: ifconfig: SIOCIFCREATE2: Invalid argument However, the same command succeeds on my VM. |
b7fad18
to
d1f3cd0
Compare
@mdlayher Please ignore my previous comment. I jsut forgot to install the wireguard-kmod package from the FreeBSD ports. Now most of the tests pass. I just got stuck with the following, which I believe is a bug in the FreeBSD kernel implementation:
|
c4d0d56
to
86b20a7
Compare
Okay, all issues fixed. Test succeed in the CI and on my VM. Currently, the FreeBSD kernel implementation does not support the PeerConfig UpdateOnly flag. @mdlayher Feel free to merge it once you are happy. I am considering the PR complete. |
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
Thanks so much. I'm a bit busy at the moment but will try to verify all of this in the next few days and get it merged. |
Sorry for the delay, I have been focused on work but haven't forgotten about this! I am spinning up a VM this morning to give it a test run and will merge if all seems good. Thank you for your contribution. |
I downloaded a FreeBSD 14.0-CURRENT image and spun it up in a VM. EDIT: it seems like the full test suite does pass, but the "configure many peers" case seems to take a very long time in userspace. There is probably something fishy going on there.
|
Either way this seems like a good starting point and I think we can iterate from here. Thank you! |
See #128. |
Signed-off-by: Steffen Vogel post@steffenvogel.de
Closes #91