mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-04 14:43:42 -04:00
ip.WithPort
This commit is contained in:
@@ -316,7 +316,7 @@ func (m DNSMap) Resolve(ctx context.Context, addr string) (netaddr.IPPort, error
|
||||
// Try MagicDNS first, else otherwise a real DNS lookup.
|
||||
ip := m[host]
|
||||
if !ip.IsZero() {
|
||||
return netaddr.IPPort{IP: ip, Port: uint16(port16)}, nil
|
||||
return ip.WithPort(uint16(port16)), nil
|
||||
}
|
||||
|
||||
// No MagicDNS name so try real DNS.
|
||||
@@ -329,7 +329,7 @@ func (m DNSMap) Resolve(ctx context.Context, addr string) (netaddr.IPPort, error
|
||||
return netaddr.IPPort{}, fmt.Errorf("DNS lookup returned no results for %q", host)
|
||||
}
|
||||
ip, _ = netaddr.FromStdIP(ips[0])
|
||||
return netaddr.IPPort{IP: ip, Port: uint16(port16)}, nil
|
||||
return ip.WithPort(uint16(port16)), nil
|
||||
}
|
||||
|
||||
func (ns *Impl) DialContextTCP(ctx context.Context, addr string) (*gonet.TCPConn, error) {
|
||||
|
||||
Reference in New Issue
Block a user