|
@@ -14,7 +14,7 @@ class KeaConfigService
|
|
|
* @var EntityManager
|
|
|
*/
|
|
|
private $em;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @var EntityRepository
|
|
|
*/
|
|
@@ -75,7 +75,7 @@ class KeaConfigService
|
|
|
*
|
|
|
* @return string
|
|
|
*/
|
|
|
- public function getConfig($id, $className = 'BaseKea', $library = '/kea-cm-hook/kea-hook-flowdat.so')
|
|
|
+ public function getConfig($id, $className = 'BaseKea', $library = '/opt/hooks/kea-cm-hook/kea-hook-flowdat.so')
|
|
|
{
|
|
|
$config = '';
|
|
|
$fullClass = 'KeaBundle\\Services\\' . $className;
|
|
@@ -240,7 +240,7 @@ class KeaConfigService
|
|
|
|
|
|
return $return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @param SubNet $subnet
|
|
|
*
|
|
@@ -262,26 +262,26 @@ class KeaConfigService
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return $position;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @return array
|
|
|
*/
|
|
|
- private function getHostsReservations()
|
|
|
+ private function getHostsReservations()
|
|
|
{
|
|
|
$subnets = $this->subnetRepository->findAll();
|
|
|
$reservations = [];
|
|
|
-
|
|
|
+
|
|
|
if(is_null($subnets) || empty($subnets)) {
|
|
|
return $reservations;
|
|
|
}
|
|
|
|
|
|
foreach ($subnets as $subnet) {
|
|
|
-
|
|
|
+
|
|
|
foreach ($subnet->getIpPool() as $pool) {
|
|
|
-
|
|
|
+
|
|
|
$start = ip2long($pool->getFirstIp());
|
|
|
$end = ip2long($pool->getLastIp());
|
|
|
|
|
@@ -295,9 +295,9 @@ class KeaConfigService
|
|
|
$qb->expr()->between('h.ipv4Address',$start,$end)
|
|
|
)
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
$hosts = $qb->getQuery()->getResult();
|
|
|
-
|
|
|
+
|
|
|
$results = array();
|
|
|
if($hosts) {
|
|
|
foreach($hosts as $host) {
|