Pull request: 3744 DNS server DHCP option
Merge in DNS/adguard-home from 3744-options-priority to master Updates #3744. Squashed commit of the following: commit 30f1d483bebd92348250573d2edd708247081b45 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 18 15:22:49 2021 +0300 dhcpd: imp tests more commit 9a8194e2f259ac7a88b23a1480c74decfef587b3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 18 15:09:20 2021 +0300 dhcpd: imp tests commit d915e0b407adcfd24df6e28be22f095909749aa3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 18 14:46:20 2021 +0300 dhcpd: fix options priority
This commit is contained in:
@@ -900,9 +900,10 @@ func (s *v4Server) process(req, resp *dhcpv4.DHCPv4) int {
|
||||
resp.UpdateOption(dhcpv4.OptGeneric(code, configured.Get(code)))
|
||||
}
|
||||
}
|
||||
// Update the value of Domain Name Server option separately from others
|
||||
// since its value is set after server's creating.
|
||||
if requested.Has(dhcpv4.OptionDomainNameServer) {
|
||||
// Update the value of Domain Name Server option separately from others if
|
||||
// not assigned yet since its value is set after server's creating.
|
||||
if requested.Has(dhcpv4.OptionDomainNameServer) &&
|
||||
!resp.Options.Has(dhcpv4.OptionDomainNameServer) {
|
||||
resp.UpdateOption(dhcpv4.OptDNS(s.conf.dnsIPAddrs...))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user