Pull request: dhcpd: do not overwrite dhcpv4 options

Updates #2927.

Squashed commit of the following:

commit b4b0f5928260a7ddada71521e5954eb326d61468
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Apr 6 16:31:01 2021 +0300

    dhcpd: do not overwrite dhcpv4 options
This commit is contained in:
Ainar Garipov 2021-04-06 16:40:05 +03:00
parent 8746005d19
commit 65553a29e9
2 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,7 @@ and this project adheres to
### Fixed
- Overwriting of DHCPv4 options when using the HTTP API ([#2927]).
- Assumption that MAC addresses always have the length of 6 octets ([#2828]).
- Support for more than one `/24` subnet in DHCP ([#2541]).
- Invalid filenames in the `mobileconfig` API responses ([#2835]).
@ -60,6 +61,7 @@ and this project adheres to
[#2828]: https://github.com/AdguardTeam/AdGuardHome/issues/2828
[#2835]: https://github.com/AdguardTeam/AdGuardHome/issues/2835
[#2838]: https://github.com/AdguardTeam/AdGuardHome/issues/2838
[#2927]: https://github.com/AdguardTeam/AdGuardHome/issues/2927

View File

@ -178,6 +178,7 @@ func (s *Server) handleDHCPSetConfig(w http.ResponseWriter, r *http.Request) {
s.srv4.WriteDiskConfig4(&c4)
v4Conf.notify = c4.notify
v4Conf.ICMPTimeout = c4.ICMPTimeout
v4Conf.Options = c4.Options
s4, err = v4Create(v4Conf)
if err != nil {