mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-18 11:05:14 +00:00
parent
ccec8a4cdb
commit
c2c6133aa5
@ -18,7 +18,7 @@ func GetLans() ([]*net.IPNet, error) {
|
||||
var addrs []net.Addr
|
||||
|
||||
for _, currentIf := range ifs {
|
||||
if currentIf.Flags&net.FlagUp != net.FlagUp {
|
||||
if currentIf.Flags&net.FlagRunning == 0 {
|
||||
continue
|
||||
}
|
||||
currentAddrs, err := currentIf.Addrs()
|
||||
|
@ -47,7 +47,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/build"
|
||||
"github.com/syncthing/syncthing/lib/dialer"
|
||||
"github.com/syncthing/syncthing/lib/nat"
|
||||
"github.com/syncthing/syncthing/lib/osutil"
|
||||
@ -100,7 +99,7 @@ func Discover(ctx context.Context, _, timeout time.Duration) []nat.Device {
|
||||
|
||||
for _, intf := range interfaces {
|
||||
// Interface flags seem to always be 0 on Windows
|
||||
if !build.IsWindows && (intf.Flags&net.FlagUp == 0 || intf.Flags&net.FlagMulticast == 0) {
|
||||
if intf.Flags&net.FlagRunning == 0 || intf.Flags&net.FlagMulticast == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user