mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
net/portmapper: don't treat 0.0.0.0 as a valid IP
Updates tailscale/corp#23538 Change-Id: I58b8c30abe43f1d1829f01eb9fb2c1e6e8db9476 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
16ef88754d
commit
262c526c4e
@ -781,6 +781,10 @@ func parsePMPResponse(pkt []byte) (res pmpResponse, ok bool) {
|
||||
return res, false
|
||||
}
|
||||
res.PublicAddr = netaddr.IPv4(pkt[8], pkt[9], pkt[10], pkt[11])
|
||||
if res.PublicAddr.IsUnspecified() {
|
||||
// Zero it out so it's not Valid and used accidentally elsewhere.
|
||||
res.PublicAddr = netip.Addr{}
|
||||
}
|
||||
}
|
||||
|
||||
return res, true
|
||||
|
Loading…
Reference in New Issue
Block a user