Stop removing the final dot from rooted DNS names (#4586)

Removing a final dot changes the meaning of the name and can cause
extra DNS lookups as the resolver traverses its search path.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2018-09-13 10:58:38 +01:00 committed by Goutham Veeramachaneni
parent 576ee4d309
commit 968f657eaa
1 changed files with 0 additions and 3 deletions

View File

@ -181,9 +181,6 @@ func (d *Discovery) refresh(ctx context.Context, name string, ch chan<- []*targe
target := model.LabelValue("")
switch addr := record.(type) {
case *dns.SRV:
// Remove the final dot from rooted DNS names to make them look more usual.
addr.Target = strings.TrimRight(addr.Target, ".")
target = hostPort(addr.Target, int(addr.Port))
case *dns.A:
target = hostPort(addr.A.String(), d.port)