5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 02:50:27 +00:00

Don't peer when source interface not found

This commit is contained in:
Neil Alexander 2018-09-28 14:59:10 +01:00
parent b7f2f8b55c
commit d027a9ba75
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -161,7 +161,9 @@ func (iface *tcpInterface) call(saddr string, socksaddr *string, sintf string) {
dialer := net.Dialer{}
if sintf != "" {
ief, err := net.InterfaceByName(sintf)
if err == nil {
if err != nil {
return
} else {
if ief.Flags & net.FlagUp == 0 {
return
}