Merge pull request #184 from yggdrasil-network/source-interface

Ignore peer in InterfacePeers when source interface not found
This commit is contained in:
Neil Alexander 2018-09-28 15:16:34 +01:00 committed by GitHub
commit b6ff6e96cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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