Skip to content

Commit

Permalink
dhcp: check address family, not track address existence
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jul 13, 2021
1 parent 72bfc49 commit d2a183a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/etc/inc/plugins.inc.d/dhcpd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1922,11 +1922,11 @@ function dhcpd_staticmap($domain_fallback = 'not.found', $ifconfig_details = nul

// XXX: dhcpdv6 domain entries have been superseded by domainsearchlist,
// for backward compatibilty support both here.
if (!empty($ipaddrv6) && !empty($host['domainsearchlist'])) {
if ($inet == 6 && !empty($host['domainsearchlist'])) {
$domain = $host['domainsearchlist'];
} elseif (!empty($host['domain'])) {
$domain = $host['domain'];
} elseif (!empty($ipaddrv6) && !empty($dhcpifconf['domainsearchlist'])) {
} elseif ($inet == 6 && !empty($dhcpifconf['domainsearchlist'])) {
$domain = $dhcpifconf['domainsearchlist'];
} elseif (!empty($dhcpifconf['domain'])) {
$domain = $dhcpifconf['domain'];
Expand Down

0 comments on commit d2a183a

Please sign in to comment.