mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 13:14:05 +00:00
add comment explaining why we remove trailing dots in searches
This commit is contained in:
committed by
Fernando Crespo Grávalos
parent
a215a88d91
commit
0b850c5d82
@@ -230,6 +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.
|
||||||
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, "."))
|
||||||
|
Reference in New Issue
Block a user