Do not query ipv6 eagerly when setup bootstrap IP

We only need on demand information when re-bootstrapping. On Bootsrap,
this is already checked by ctrldnet.Up, so on demand query will cause
un-necessary slow down if external ipv6 is slow to response.
This commit is contained in:
Cuong Manh Le
2023-03-15 23:26:57 +07:00
committed by Cuong Manh Le
parent 77b62f8734
commit e4eb3b2ded

View File

@@ -207,7 +207,7 @@ func (uc *UpstreamConfig) SetupBootstrapIP() {
uc.nextBootstrapIP.Add(1)
// If this is an ipv6, and ipv6 is not available, don't use it as bootstrap ip.
if !ctrldnet.IPv6Available(ctx) && ctrldnet.IsIPv6(ip) {
if !ctrldnet.SupportsIPv6() && ctrldnet.IsIPv6(ip) {
continue
}
uc.BootstrapIP = ip