From 8da2bae1bad14daeb26580773ffc3a3a3625e480 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Mon, 15 Apr 2024 09:24:37 +0200 Subject: [PATCH] Ensure that the tel2-search is a top-level domain. Signed-off-by: Thomas Hallgren --- pkg/client/rootd/dns/server.go | 4 +++- pkg/client/rootd/dns/server_darwin.go | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/client/rootd/dns/server.go b/pkg/client/rootd/dns/server.go index 351f99b9de..03419c37f0 100644 --- a/pkg/client/rootd/dns/server.go +++ b/pkg/client/rootd/dns/server.go @@ -513,12 +513,14 @@ func (s *Server) processSearchPaths(g *dgroup.Group, processor func(context.Cont } prevDas = das - routes := make(map[string]struct{}, len(das.domains)) + routes := make(map[string]struct{}, len(das.domains)+1) for _, domain := range das.domains { if domain != "" { routes[domain] = struct{}{} } } + routes[tel2SubDomain] = struct{}{} + s.Lock() s.routes = routes diff --git a/pkg/client/rootd/dns/server_darwin.go b/pkg/client/rootd/dns/server_darwin.go index a7122e7fc7..f8cbe3fe15 100644 --- a/pkg/client/rootd/dns/server_darwin.go +++ b/pkg/client/rootd/dns/server_darwin.go @@ -133,7 +133,6 @@ func (s *Server) updateResolverFiles(c context.Context, resolverDirName string, } clusterDomain := strings.TrimSuffix(s.clusterDomain, ".") domains[clusterDomain] = newDomainResolveFile(clusterDomain) - domains[tel2SubDomain] = newDomainResolveFile(tel2SubDomain) nextSearch: for _, search := range s.search {