mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Implement review suggestions
This commit is contained in:
parent
ef64acd271
commit
90a113397f
3 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,8 @@ func sendResponse(
|
|||
return nil
|
||||
}
|
||||
// Signify that we are a recursive resolver.
|
||||
// While we do not handle recursion directly, we can safely assume, that we
|
||||
// always forward to a recursive resolver.
|
||||
reply.RecursionAvailable = true
|
||||
|
||||
// Add extra RRs through a custom RRProvider.
|
||||
|
|
|
@ -205,12 +205,15 @@ func createResolver(resolverURL, source string) (*Resolver, bool, error) {
|
|||
}
|
||||
|
||||
func configureSearchDomains(resolver *Resolver, searches []string, hardfail bool) error {
|
||||
resolver.Search = make([]string, 0, len(searches))
|
||||
|
||||
// Check all search domains.
|
||||
for i, value := range searches {
|
||||
trimmedDomain := strings.ToLower(strings.Trim(value, "."))
|
||||
err := checkSearchScope(trimmedDomain)
|
||||
if err != nil {
|
||||
if hardfail {
|
||||
resolver.Search = nil
|
||||
return fmt.Errorf("failed to validate search domain #%d: %w", i+1, err)
|
||||
}
|
||||
log.Warningf("resolver: skipping invalid search domain for resolver %s: %s", resolver, utils.SafeFirst16Chars(value))
|
||||
|
|
|
@ -117,6 +117,7 @@ func upgradeCoreNotify() error {
|
|||
),
|
||||
ShowOnSystem: true,
|
||||
AvailableActions: []*notifications.Action{
|
||||
// TODO: Use special UI action in order to reload UI on restart.
|
||||
{
|
||||
ID: "restart",
|
||||
Text: "Restart",
|
||||
|
|
Loading…
Add table
Reference in a new issue