[client] Eliminate upstream server strings in dns code (#4267)

This commit is contained in:
Viktor Liu
2025-08-11 11:57:21 +02:00
committed by GitHub
parent 375fcf2752
commit 1022a5015c
30 changed files with 161 additions and 308 deletions

View File

@@ -40,7 +40,7 @@ type resolvconf struct {
implType resolvconfType
originalSearchDomains []string
originalNameServers []string
originalNameServers []netip.Addr
othersConfigs []string
}
@@ -110,7 +110,7 @@ func (r *resolvconf) applyDNSConfig(config HostDNSConfig, stateManager *stateman
return nil
}
func (r *resolvconf) getOriginalNameservers() []string {
func (r *resolvconf) getOriginalNameservers() []netip.Addr {
return r.originalNameServers
}
@@ -158,7 +158,7 @@ func (r *resolvconf) applyConfig(content bytes.Buffer) error {
return nil
}
func (r *resolvconf) restoreUncleanShutdownDNS(*netip.Addr) error {
func (r *resolvconf) restoreUncleanShutdownDNS(netip.Addr) error {
if err := r.restoreHostDNS(); err != nil {
return fmt.Errorf("restoring dns for interface %s: %w", r.ifaceName, err)
}