|
@@ -246,11 +246,13 @@ class KeaConfigService
|
|
|
// se usan valores por defecto
|
|
|
$config = $this->getConfig(1, 'BaseKea', '/kea-cm-hook/kea-hook-flowdat.so');
|
|
|
$configDecode = json_decode($config, true);
|
|
|
- foreach ($configDecode[0]['arguments']['Dhcp4']['subnet4'] as $subnetConfig) {
|
|
|
- if ($subnetConfig['subnet'] == $subnet->getAddress()) {
|
|
|
- break;
|
|
|
+ if (isset($configDecode[0]['arguments']['Dhcp4']['subnet4'])) {
|
|
|
+ foreach ($configDecode[0]['arguments']['Dhcp4']['subnet4'] as $subnetConfig) {
|
|
|
+ if ($subnetConfig['subnet'] == $subnet->getAddress()) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $position++;
|
|
|
}
|
|
|
- $position++;
|
|
|
}
|
|
|
}
|
|
|
|