mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 16:35:10 +03:00
populate default PlatformSpecificParams when it's empty (#43)
This commit is contained in:
parent
8bbc3c8191
commit
bf1a5d0277
3 changed files with 5 additions and 1 deletions
3
if.go
3
if.go
|
@ -53,6 +53,9 @@ func New(config Config) (ifce *Interface, err error) {
|
|||
if zeroConfig == config {
|
||||
config = defaultConfig()
|
||||
}
|
||||
if config.PlatformSpecificParams == zeroConfig.PlatformSpecificParams {
|
||||
config.PlatformSpecificParams = defaultPlatformSpecificParams()
|
||||
}
|
||||
switch config.DeviceType {
|
||||
case TUN:
|
||||
return newTUN(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue