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

Port to DragonFly BSD #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

falsifian
Copy link
Contributor

@falsifian falsifian commented Jun 19, 2021

Original patch (on top of commit e852f4c) by Aaron Li <[email protected]> in
2020. Rebased with minor tweaks.

The TUN device/interface on DragonFly BSD is very similar to the FreeBSD
one, so it's rather easy to port WireGuard-go to DragonFly BSD based on
the FreeBSD support code.

The tun_dragonfly.go code is derived from the tun_freebsd.go code.
One major difference is that DragonFly BSD's TUN device supports the
TUNGIFNAME ioctl [0] for easily getting the assigned interface name.
The remaining differences are mostly minor cleanups and tweaks.

I've tested that DragonFly BSD's TUN device doesn't have the race issue
like the FreeBSD one [1], so I didn't keep the code to disable LLv6.

Tested on DragonFly BSD master branch (6.1-DEVELOPMENT) as of
2021-Jun-18. Requires a pending fix to the x/net library:
https://go-review.googlesource.com/c/net/+/328331/

Also thank François Tigeot, who ported WireGuard-go to DragonFly BSD's
DeltaPorts/DPorts [2].

[0] DragonFlyBSD/DragonFlyBSD@0df03f1
[1] bb42ec7
[2] DragonFlyBSD/DeltaPorts@ef67233

Signed-off-by: James Cook [email protected]

Original patch (on top of commit e852f4c) by Aaron Li <[email protected]> in
2020. Rebased with minor tweaks.

The TUN device/interface on DragonFly BSD is very similar to the FreeBSD
one, so it's rather easy to port WireGuard-go to DragonFly BSD based on
the FreeBSD support code.

The `tun_dragonfly.go` code is derived from the `tun_freebsd.go` code.
One major difference is that DragonFly BSD's TUN device supports the
`TUNGIFNAME` ioctl [0] for easily getting the assigned interface name.
The remaining differences are mostly minor cleanups and tweaks.

I've tested that DragonFly BSD's TUN device doesn't have the race issue
like the FreeBSD one [1], so I didn't keep the code to disable LLv6.

Tested on DragonFly BSD master branch (6.1-DEVELOPMENT) as of
2021-Jun-18. Requires a pending fix to the x/net library:
https://go-review.googlesource.com/c/net/+/328331/

Also thank François Tigeot, who ported WireGuard-go to DragonFly BSD's
DeltaPorts/DPorts [2].

[0] DragonFlyBSD/DragonFlyBSD@0df03f1
[1] WireGuard@bb42ec7
[2] DragonFlyBSD/DeltaPorts@ef67233

Signed-off-by: James Cook <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant