Merge pull request #1153 from jterry75/max_search_error

Update parseDNSOptions maxDNSSearches in error message
This commit is contained in:
Mike Brown 2019-05-26 15:51:01 +02:00 committed by GitHub
commit ac9f8e1c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,7 +500,7 @@ func parseDNSOptions(servers, searches, options []string) (string, error) {
resolvContent := "" resolvContent := ""
if len(searches) > maxDNSSearches { if len(searches) > maxDNSSearches {
return "", errors.New("DNSOption.Searches has more than 6 domains") return "", errors.Errorf("DNSOption.Searches has more than %d domains", maxDNSSearches)
} }
if len(searches) > 0 { if len(searches) > 0 {