Skip to content

Commit 0dd8a94

Browse files
committed
ipn/proxy.go: err reachability out if no ips of requested family
1 parent 113dc27 commit 0dd8a94

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

intra/ipn/proxy.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,12 @@ func httpsReachesWorkCtx(p Proxy, url *url.URL) core.WorkCtx[bool] {
663663

664664
n := rand.Intn(len(ipps))
665665

666-
log.VV("proxy: %s reaches: dial(%s, %s => %s [among %v]) for %s",
667-
idstr(p), network, addr, ipps[n], ipps, url)
666+
logeif(len(ipps) == 0)("proxy: %s reaches: dial(%s, %s => %d [among %v]) for %s",
667+
idstr(p), network, addr, n, ipps, url)
668+
669+
if len(ipps) <= 0 {
670+
return nil, errNoSuitableAddress
671+
}
668672

669673
// filter out the revelant IPs ourselves as dialers pkg does not
670674
// respect ip-specific network type "tcp4" or "tcp6"

0 commit comments

Comments
 (0)