mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
all: upd chlog, minimize diff to master
This commit is contained in:
parent
119100924c
commit
4813b4de25
7 changed files with 36 additions and 45 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -27,11 +27,6 @@ and this project adheres to
|
|||
-->
|
||||
- Go 1.17 support. v0.109.0 will require at least Go 1.18 to build.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Unnecessarily complex hosts-related logic leading to infinite recursion in
|
||||
some cases ([#4216]).
|
||||
|
||||
### Removed
|
||||
|
||||
- Go 1.16 support.
|
||||
|
@ -40,9 +35,14 @@ and this project adheres to
|
|||
|
||||
|
||||
|
||||
<!--
|
||||
## [v0.107.4] - 2022-03-01 (APPROX.)
|
||||
-->
|
||||
|
||||
### Fixed
|
||||
|
||||
- Unnecessarily complex hosts-related logic leading to infinite recursion in
|
||||
some cases ([#4216]).
|
||||
|
||||
[#4216]: https://github.com/AdguardTeam/AdGuardHome/issues/4216
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ func discover4(iface *net.Interface, dstAddr *net.UDPAddr, hostname string) (ok
|
|||
// is spoiled.
|
||||
//
|
||||
// It's also known that listening on the specified interface's address
|
||||
// ignores broadcasted packets when reading.
|
||||
// ignores broadcast packets when reading.
|
||||
var c net.PacketConn
|
||||
if c, err = listenPacketReusable(iface.Name, "udp4", ":68"); err != nil {
|
||||
return false, fmt.Errorf("couldn't listen on :68: %w", err)
|
||||
|
|
|
@ -12,33 +12,33 @@ import (
|
|||
func TestNullBool_UnmarshalJSON(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
data []byte
|
||||
wantErrMsg string
|
||||
data []byte
|
||||
want nullBool
|
||||
}{{
|
||||
name: "empty",
|
||||
data: []byte{},
|
||||
wantErrMsg: "",
|
||||
data: []byte{},
|
||||
want: nbNull,
|
||||
}, {
|
||||
name: "null",
|
||||
data: []byte("null"),
|
||||
wantErrMsg: "",
|
||||
data: []byte("null"),
|
||||
want: nbNull,
|
||||
}, {
|
||||
name: "true",
|
||||
data: []byte("true"),
|
||||
wantErrMsg: "",
|
||||
data: []byte("true"),
|
||||
want: nbTrue,
|
||||
}, {
|
||||
name: "false",
|
||||
data: []byte("false"),
|
||||
wantErrMsg: "",
|
||||
data: []byte("false"),
|
||||
want: nbFalse,
|
||||
}, {
|
||||
name: "invalid",
|
||||
data: []byte("flase"),
|
||||
wantErrMsg: `invalid nullBool value "flase"`,
|
||||
wantErrMsg: `invalid nullBool value "invalid"`,
|
||||
data: []byte("invalid"),
|
||||
want: nbNull,
|
||||
}}
|
||||
|
||||
|
|
|
@ -130,21 +130,19 @@ func parseDHCPOption(s string) (opt dhcpv4.Option, err error) {
|
|||
// prepareOptions builds the set of DHCP options according to host requirements
|
||||
// document and values from conf.
|
||||
func prepareOptions(conf V4ServerConf) (opts dhcpv4.Options) {
|
||||
// Set default values for host configuration parameters listed in Appendix
|
||||
// A of RFC-2131. Those parameters, if requested by client, should be
|
||||
// returned with values defined by Host Requirements Document.
|
||||
//
|
||||
// See https://datatracker.ietf.org/doc/html/rfc2131#appendix-A.
|
||||
//
|
||||
// See also https://datatracker.ietf.org/doc/html/rfc1122,
|
||||
// https://datatracker.ietf.org/doc/html/rfc1123, and
|
||||
// https://datatracker.ietf.org/doc/html/rfc2132.
|
||||
opts = dhcpv4.Options{
|
||||
// Set default values for host configuration parameters listed
|
||||
// in Appendix A of RFC-2131. Those parameters, if requested by
|
||||
// client, should be returned with values defined by Host
|
||||
// Requirements Document.
|
||||
//
|
||||
// See https://datatracker.ietf.org/doc/html/rfc2131#appendix-A.
|
||||
//
|
||||
// See also https://datatracker.ietf.org/doc/html/rfc1122,
|
||||
// https://datatracker.ietf.org/doc/html/rfc1123, and
|
||||
// https://datatracker.ietf.org/doc/html/rfc2132.
|
||||
|
||||
// IP-Layer Per Host
|
||||
|
||||
dhcpv4.OptionNonLocalSourceRouting.Code(): []byte{0},
|
||||
|
||||
// Set the current recommended default time to live for the
|
||||
// Internet Protocol which is 64, see
|
||||
// https://datatracker.ietf.org/doc/html/rfc1700.
|
||||
|
|
|
@ -27,7 +27,6 @@ type DHCPServer interface {
|
|||
Start() (err error)
|
||||
// Stop - stop server
|
||||
Stop() (err error)
|
||||
|
||||
getLeasesRef() []*Lease
|
||||
}
|
||||
|
||||
|
|
|
@ -969,11 +969,10 @@ func (s *v4Server) send(peer net.Addr, conn net.PacketConn, req, resp *dhcpv4.DH
|
|||
Port: dhcpv4.ServerPort,
|
||||
}
|
||||
if mtype == dhcpv4.MessageTypeNak {
|
||||
// Set the broadcast bit in the DHCPNAK, so that the
|
||||
// relay agent broadcasted it to the client, because the
|
||||
// client may not have a correct network address or
|
||||
// subnet mask, and the client may not be answering ARP
|
||||
// requests.
|
||||
// Set the broadcast bit in the DHCPNAK, so that the relay agent
|
||||
// broadcasts it to the client, because the client may not have
|
||||
// a correct network address or subnet mask, and the client may not
|
||||
// be answering ARP requests.
|
||||
resp.SetBroadcast()
|
||||
}
|
||||
case mtype == dhcpv4.MessageTypeNak:
|
||||
|
|
|
@ -384,16 +384,15 @@ rerun_with_root() {
|
|||
|
||||
log 'restarting with root privileges'
|
||||
|
||||
# Group curl together with an echo, so that if curl fails before
|
||||
# producing any output, the echo prints an exit command for the
|
||||
# following shell to execute to prevent it from getting an empty input
|
||||
# and exiting with a zero code in that case.
|
||||
# Group curl together with an echo, so that if curl fails before producing
|
||||
# any output, the echo prints an exit command for the following shell to
|
||||
# execute to prevent it from getting an empty input and exiting with a zero
|
||||
# code in that case.
|
||||
{ curl -L -S -s "$script_url" || echo 'exit 1'; }\
|
||||
| $sudo_cmd sh -s -- -c "$channel" -C "$cpu" -O "$os" -o "$out_dir" "$r" "$u" "$v"
|
||||
|
||||
# Exit the script. Since if the code of the previous pipeline is
|
||||
# non-zero, the execution won't reach this point thanks to set -e, exit
|
||||
# with zero.
|
||||
# Exit the script. Since if the code of the previous pipeline is non-zero,
|
||||
# the execution won't reach this point thanks to set -e, exit with zero.
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -483,11 +482,7 @@ handle_existing() {
|
|||
|
||||
# Function install_service tries to install AGH as service.
|
||||
install_service() {
|
||||
# Installing as root is required at least on FreeBSD.
|
||||
#
|
||||
# TODO(e.burkov): Think about AGH's output suppressing with no verbose
|
||||
# flag.
|
||||
if ( cd "$agh_dir" && $sudo_cmd ./AdGuardHome -s install )
|
||||
if ( cd "$agh_dir" && ./AdGuardHome -s install )
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue