diff options
Diffstat (limited to 'p2p/nat/natpmp.go')
-rw-r--r-- | p2p/nat/natpmp.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/nat/natpmp.go b/p2p/nat/natpmp.go index 577a424fb..8ba971472 100644 --- a/p2p/nat/natpmp.go +++ b/p2p/nat/natpmp.go @@ -115,8 +115,7 @@ func potentialGateways() (gws []net.IP) { return gws } for _, addr := range ifaddrs { - switch x := addr.(type) { - case *net.IPNet: + if x, ok := addr.(*net.IPNet); ok { if lan10.Contains(x.IP) || lan176.Contains(x.IP) || lan192.Contains(x.IP) { ip := x.IP.Mask(x.Mask).To4() if ip != nil { |