Skip to content

Commit

Permalink
Return in case of no dns servers
Browse files Browse the repository at this point in the history
  • Loading branch information
lnguyen committed Mar 25, 2024
1 parent fe61b80 commit e9bd9f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/net/dnsresolver/dns_systemd_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ func NewSystemdResolver(
}

func (d *systemdResolver) Validate(dnsServers []string) error {
if len(dnsServers) == 0 {
return nil
}

resolvConfContents, err := d.fs.ReadFileString("/etc/systemd/resolved.conf.d/10-bosh.conf")
if err != nil {
return bosherr.WrapError(err, "Reading /etc/systemd/resolved.conf.d/10-bosh.conf")
Expand Down

0 comments on commit e9bd9f4

Please sign in to comment.