Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions syscalls_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,17 @@ func openDev(config Config) (ifce *Interface, err error) {
fd := &wfile{fd: file, ro: ro, wo: wo}
ifce = &Interface{isTAP: (config.DeviceType == TAP), ReadWriteCloser: fd}

// bring up device.
if err := setStatus(file, true); err != nil {
return nil, err
}

//TUN
if config.DeviceType == TUN {
if err := setTUN(file, config.PlatformSpecificParams.Network); err != nil {
return nil, err
}
}

// bring up device.
if err := setStatus(file, true); err != nil {
return nil, err
}

// find the name of tap interface(u need it to set the ip or other command)
ifces, err := net.Interfaces()
Expand Down