Skip to content

Commit

Permalink
Ensure DoH warnings are only emitted if err
Browse files Browse the repository at this point in the history
Fixes #2064

Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Aug 23, 2024
1 parent bd4fad6 commit f3bb30e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ func (d *DNSConfig) GlobalResolvers() []*dnstype.Resolver {
resolvers = append(resolvers, &dnstype.Resolver{
Addr: nsStr,
})

continue
} else {
warn = fmt.Sprintf("Invalid global nameserver %q. Parsing error: %s ignoring", nsStr, err)
}
Expand Down Expand Up @@ -635,6 +637,8 @@ func (d *DNSConfig) SplitResolvers() map[string][]*dnstype.Resolver {
resolvers = append(resolvers, &dnstype.Resolver{
Addr: nsStr,
})

continue
} else {
warn = fmt.Sprintf("Invalid split dns nameserver %q. Parsing error: %s ignoring", nsStr, err)
}
Expand Down

0 comments on commit f3bb30e

Please sign in to comment.