Minor fix local dns search domain (#2287)

This commit is contained in:
Carlos Hernandez 2024-07-19 08:44:12 -06:00 committed by GitHub
parent c815ad86fd
commit 0a8c78deb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,8 +225,8 @@ func (s *systemConfigurator) getSystemDNSSettings() (SystemDNSSettings, error) {
}
if inSearchDomainsArray {
searchDomains := strings.Split(line, " : ")
dnsSettings.Domains = append(dnsSettings.Domains, searchDomains...)
searchDomain := strings.Split(line, " : ")[1]
dnsSettings.Domains = append(dnsSettings.Domains, searchDomain)
} else if inServerAddressesArray {
address := strings.Split(line, " : ")[1]
if ip := net.ParseIP(address); ip != nil && ip.To4() != nil {