Pull request: 3289 freebsd dhcp

Merge in DNS/adguard-home from 3289-freebsd-dhcp to master

Updates #3289.

Squashed commit of the following:

commit 1365d8f17293da611b860525d519a7bbd7851902
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jul 30 15:01:13 2021 +0300

    dhcpd: fix doc

commit 26724df27e92d457c39c8bf0fb78179a874e3fb2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jul 30 14:52:58 2021 +0300

    all: imp code & docs

commit 9a9574a885d3d2129ef54fefb9a56857ce060cff
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Jul 29 15:51:07 2021 +0300

    all: fix broadcasting, sup freebsd dhcp, fix http response
This commit is contained in:
Eugene Burkov
2021-07-30 15:27:24 +03:00
parent 63ee95dfbe
commit 6fa1167251
7 changed files with 178 additions and 11 deletions

View File

@@ -1,12 +1,9 @@
//go:build !(linux || darwin)
// +build !linux,!darwin
//go:build !(linux || darwin || freebsd)
// +build !linux,!darwin,!freebsd
package aghnet
import (
"fmt"
"runtime"
"github.com/AdguardTeam/AdGuardHome/internal/aghos"
)
@@ -14,10 +11,10 @@ func canBindPrivilegedPorts() (can bool, err error) {
return aghos.HaveAdminRights()
}
func ifaceHasStaticIP(string) (bool, error) {
return false, fmt.Errorf("cannot check if IP is static: not supported on %s", runtime.GOOS)
func ifaceHasStaticIP(string) (ok bool, err error) {
return false, aghos.Unsupported("checking static ip")
}
func ifaceSetStaticIP(string) error {
return fmt.Errorf("cannot set static IP on %s", runtime.GOOS)
func ifaceSetStaticIP(string) (err error) {
return aghos.Unsupported("setting static ip")
}