mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 14:10:28 +00:00
Don't peer when source interface not found
This commit is contained in:
parent
b7f2f8b55c
commit
d027a9ba75
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user