mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/enode: fix ipv6 address used as extip results
This commit is contained in:
parent
577a52a056
commit
d35a62e05a
1 changed files with 17 additions and 20 deletions
|
|
@ -114,12 +114,9 @@ func (n *Node) IP() net.IP {
|
|||
if n.Load(&ip6) == nil {
|
||||
return net.IP(ip6)
|
||||
}
|
||||
if n.Load(&ip4) == nil {
|
||||
ipv4Addr := net.IP(ip4)
|
||||
if ipv4Addr.IsLoopback() {
|
||||
if ipv4Addr := net.IP(ip4); ipv4Addr.IsLoopback() {
|
||||
return ipv4Addr
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue