mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
improve explanatory comment about trailing dots in searches
This commit is contained in:
parent
0b850c5d82
commit
9dac0c2d02
@ -230,7 +230,7 @@ func parseResolvConf(reader io.Reader) (nameservers []string, searches []string,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if fields[0] == "search" {
|
if fields[0] == "search" {
|
||||||
// Strip redundant trailing dot to avoid hitting search validation limits.
|
// Normalise search fields so the same domain with and without trailing dot will only count once, to avoid hitting search validation limits.
|
||||||
trimTrailingDot := []string{}
|
trimTrailingDot := []string{}
|
||||||
for _, s := range fields[1:] {
|
for _, s := range fields[1:] {
|
||||||
trimTrailingDot = append(trimTrailingDot, strings.TrimSuffix(s, "."))
|
trimTrailingDot = append(trimTrailingDot, strings.TrimSuffix(s, "."))
|
||||||
|
Loading…
Reference in New Issue
Block a user