lib/{nat,pmp}: Fix shadowing and nil IPs

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/2979
This commit is contained in:
Audrius Butkevicius authored and Jakob Borg committed 2016-04-16 16:48:07 +00:00
1 parent fa1cfd94d0
commit e61f424ade
2 files changed
+6 -2

No files matched your search

+3
View File
@@ -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)