|
@@ -130,11 +130,12 @@ class BaseKea implements KeaConfigInterface
|
|
$sharedNetworkTmp['subnet4'][] = $this->getSubnetSharedNetwork($subnets[0], $reservations);
|
|
$sharedNetworkTmp['subnet4'][] = $this->getSubnetSharedNetwork($subnets[0], $reservations);
|
|
unset($subnets[0]);
|
|
unset($subnets[0]);
|
|
}
|
|
}
|
|
|
|
+
|
|
foreach ($subnets as $subnet) {
|
|
foreach ($subnets as $subnet) {
|
|
- if ($subnet->getAllowedHostType() != $hostType &&
|
|
|
|
- $subnet->getNetGroup() != $netGroup &&
|
|
|
|
|
|
+ if ($subnet->getAllowedHostType() != $hostType ||
|
|
|
|
+ $subnet->getNetGroup() != $netGroup ||
|
|
$subnet->getStatus() != $status) {
|
|
$subnet->getStatus() != $status) {
|
|
-
|
|
|
|
|
|
+
|
|
$this->shared_networks[] = $sharedNetworkTmp;
|
|
$this->shared_networks[] = $sharedNetworkTmp;
|
|
|
|
|
|
$hostType = $subnet->getAllowedHostType();
|
|
$hostType = $subnet->getAllowedHostType();
|
|
@@ -142,11 +143,13 @@ class BaseKea implements KeaConfigInterface
|
|
$status = $subnet->getStatus();
|
|
$status = $subnet->getStatus();
|
|
|
|
|
|
$sharedNetworkTmp = $sharedNetwork;
|
|
$sharedNetworkTmp = $sharedNetwork;
|
|
- $sharedNetworkTmp['name'] = $sharedNetworkTmp['name'] . count($this->shared_networks) + 1;
|
|
|
|
|
|
+ $count = count($this->shared_networks) + 1;
|
|
|
|
+ $sharedNetworkTmp['name'] = "shared-network-{$count}";
|
|
$sharedNetworkTmp['relay'] = $this->getOptionDataSharedNetwork($subnet);
|
|
$sharedNetworkTmp['relay'] = $this->getOptionDataSharedNetwork($subnet);
|
|
}
|
|
}
|
|
$sharedNetworkTmp['subnet4'][] = $this->getSubnetSharedNetwork($subnet, $reservations);
|
|
$sharedNetworkTmp['subnet4'][] = $this->getSubnetSharedNetwork($subnet, $reservations);
|
|
}
|
|
}
|
|
|
|
+
|
|
$this->shared_networks[] = $sharedNetworkTmp;
|
|
$this->shared_networks[] = $sharedNetworkTmp;
|
|
}
|
|
}
|
|
|
|
|