Pull request: dhcpd: do not override ra-slaac settings

Merge in DNS/adguard-home from 2653-ra-slaac to master

Updates #2653.

Squashed commit of the following:

commit f261413a58dc813e37cc848606ed490b8c0ac9f3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 20:37:13 2021 +0300

    all: doc changes, rm debug

commit 4a8c6e4897579493c1ca242fb8f0f440c3b51a74
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Feb 11 20:11:46 2021 +0300

    dhcpd: do not override ra-slaac settings
This commit is contained in:
Ainar Garipov
2021-02-11 20:49:03 +03:00
parent 7b014082ab
commit 2eb21ef409
10 changed files with 223 additions and 67 deletions

View File

@@ -33,15 +33,19 @@ func ifaceHasStaticIP(ifaceName string) (has bool, err error) {
filePath: "/etc/network/interfaces",
}} {
f, err = os.Open(check.filePath)
if errors.Is(err, os.ErrNotExist) {
continue
}
if err != nil {
if errors.Is(err, os.ErrNotExist) {
err = nil
continue
}
return false, err
}
defer f.Close()
fileReadCloser, err := aghio.LimitReadCloser(f, maxConfigFileSize)
var fileReadCloser io.ReadCloser
fileReadCloser, err = aghio.LimitReadCloser(f, maxConfigFileSize)
if err != nil {
return false, err
}