mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-10 07:20:39 +03:00
166d25619d
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.
11 lines
207 B
Go
11 lines
207 B
Go
package yggdrasil
|
|
|
|
func getDefaults() tunDefaultParameters {
|
|
return tunDefaultParameters{
|
|
maximumIfMTU: 9000,
|
|
defaultIfMTU: 9000,
|
|
defaultIfName: "/dev/tap0",
|
|
defaultIfTAPMode: true,
|
|
}
|
|
}
|