mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Attempt to support NetBSD
This code actually consolidates a lot of the BSD code together, and even setting the interface MTU with SIOCSIFMTU seems to work fine. What doesn't work though is setting the interface address using SIOCSIFADDR_IN6, which I attempted to plagiarise from the Darwin code. As a fallback, ifconfig is used, which solves the problem enough to get it working.
This commit is contained in:
parent
b30b6022a8
commit
166d25619d
5 changed files with 106 additions and 111 deletions
10
src/yggdrasil/tun_netbsd.go
Normal file
10
src/yggdrasil/tun_netbsd.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package yggdrasil
|
||||
|
||||
func getDefaults() tunDefaultParameters {
|
||||
return tunDefaultParameters{
|
||||
maximumIfMTU: 9000,
|
||||
defaultIfMTU: 9000,
|
||||
defaultIfName: "/dev/tap0",
|
||||
defaultIfTAPMode: true,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue