lib/{nat,pmp}: Fix shadowing and nil IPs
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/2979
This commit is contained in:
committed by
Jakob Borg
parent
fa1cfd94d0
commit
e61f424ade
@@ -27,6 +27,9 @@ func Discover(renewal, timeout time.Duration) []nat.Device {
|
||||
l.Debugln("Failed to discover gateway", err)
|
||||
return nil
|
||||
}
|
||||
if ip == nil || ip.IsUnspecified() {
|
||||
return nil
|
||||
}
|
||||
|
||||
l.Debugln("Discovered gateway at", ip)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user