|
@@ -116,7 +116,9 @@ class BaseKea implements KeaConfigInterface
|
|
if ($option122 && $ip) {
|
|
if ($option122 && $ip) {
|
|
$macs = [];
|
|
$macs = [];
|
|
foreach ($hosts as $host) {
|
|
foreach ($hosts as $host) {
|
|
- $macs[] = $host->getMac();
|
|
|
|
|
|
+ if ($host->getMac()) {
|
|
|
|
+ $macs[] = $host->getMac();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
$hook['parameters']['option122'] = [
|
|
$hook['parameters']['option122'] = [
|
|
@@ -128,13 +130,15 @@ class BaseKea implements KeaConfigInterface
|
|
if ($remote_id_map) {
|
|
if ($remote_id_map) {
|
|
$hostConfig = [];
|
|
$hostConfig = [];
|
|
foreach ($hosts as $host) {
|
|
foreach ($hosts as $host) {
|
|
- $mac = $host->getMac();
|
|
|
|
- $state = $host->getState();
|
|
|
|
- $shortname = $host->getHostType()->getShortname();
|
|
|
|
-
|
|
|
|
- $client_class = $state != HostStatus::STATE_NONE ? $state : $shortname;
|
|
|
|
-
|
|
|
|
- $hostConfig[$client_class][] = $mac;
|
|
|
|
|
|
+ if ($host->getMac()) {
|
|
|
|
+ $mac = $host->getMac();
|
|
|
|
+ $state = $host->getState();
|
|
|
|
+ $shortname = $host->getHostType()->getShortname();
|
|
|
|
+
|
|
|
|
+ $client_class = $state != HostStatus::STATE_NONE ? $state : $shortname;
|
|
|
|
+
|
|
|
|
+ $hostConfig[$client_class][] = $mac;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
$hook['parameters']['remote-id-map'] = $hostConfig;
|
|
$hook['parameters']['remote-id-map'] = $hostConfig;
|
|
}
|
|
}
|