mirror of
https://github.com/fumiama/water.git
synced 2026-06-28 07:50:25 +08:00
use blocking mode pre-go1.11
This commit is contained in:
6
if.go
6
if.go
@@ -57,10 +57,8 @@ func New(config Config) (ifce *Interface, err error) {
|
||||
config.PlatformSpecificParams = defaultPlatformSpecificParams()
|
||||
}
|
||||
switch config.DeviceType {
|
||||
case TUN:
|
||||
return newTUN(config)
|
||||
case TAP:
|
||||
return newTAP(config)
|
||||
case TUN, TAP:
|
||||
return openDev(config)
|
||||
default:
|
||||
return nil, errors.New("unknown device type")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user