fix: no default fallback dns server

This commit is contained in:
Qiu Jian
2023-12-08 01:15:15 +08:00
parent 8fa8266009
commit 41f77abfc7
4 changed files with 9 additions and 15 deletions
+4 -4
View File
@@ -341,10 +341,9 @@ func (keeper *OVNNorthboundKeeper) ClaimNetwork(ctx context.Context, network *ag
dnsSrvs = strings.Join(dns, ",")
}
}
if len(dnsSrvs) == 0 {
dnsSrvs = apis.DefaultDNSServers
if len(dnsSrvs) > 0 {
dhcpopts.Options["dns_server"] = "{" + dnsSrvs + "}"
}
dhcpopts.Options["dns_server"] = "{" + dnsSrvs + "}"
}
{
ntpSrvs := ""
@@ -360,7 +359,8 @@ func (keeper *OVNNorthboundKeeper) ClaimNetwork(ctx context.Context, network *ag
}
}
if len(ntpSrvs) > 0 {
dhcpopts.Options["ntp_server"] = "{" + ntpSrvs + "}"
// bug on OVN, should not use ntp server
// dhcpopts.Options["ntp_server"] = "{" + ntpSrvs + "}"
}
}