Pull request: home: rm unnecessary locking in update; refactor

Merge in DNS/adguard-home from 4499-rm-unnecessary-locking to master

Squashed commit of the following:

commit 6d70472506dd0fd69225454c73d9f7f6a208b76b
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Apr 25 17:26:54 2022 +0300

    home: rm unnecessary locking in update; refactor
This commit is contained in:
Ainar Garipov
2022-04-25 18:41:39 +03:00
parent 9d144ecb0a
commit 2a1ad532f4
6 changed files with 79 additions and 60 deletions

View File

@@ -1,5 +1,5 @@
//go:build !linux
// +build !linux
//go:build darwin || freebsd || openbsd
// +build darwin freebsd openbsd
package aghnet

View File

@@ -1,5 +1,5 @@
//go:build !(linux || darwin || freebsd || openbsd)
// +build !linux,!darwin,!freebsd,!openbsd
//go:build windows
// +build windows
package aghnet
@@ -13,6 +13,10 @@ import (
"golang.org/x/sys/windows"
)
func canBindPrivilegedPorts() (can bool, err error) {
return true, nil
}
func ifaceHasStaticIP(string) (ok bool, err error) {
return false, aghos.Unsupported("checking static ip")
}