fix bug in create host in dhcp
ogdhcp/pipeline/head This commit looks good Details

pull/9/head
Luis Gerardo Romero Garcia 2025-06-05 11:04:03 +02:00
parent 602ac1613c
commit 731955a183
1 changed files with 2 additions and 3 deletions

View File

@ -1383,7 +1383,7 @@ public function addDhcpHost(Request $request, $subnetId): JsonResponse
$macAddress = htmlspecialchars($input->macAddress); $macAddress = htmlspecialchars($input->macAddress);
$address = htmlspecialchars($input->address); $address = htmlspecialchars($input->address);
// $bootFileName= htmlspecialchars($input->bootFileName); // $bootFileName= htmlspecialchars($input->bootFileName);
$bootFileName = isset($input->bootFileName) ? htmlspecialchars($input->bootFileName) : null; $bootFileName = isset($input->bootFileName) ? htmlspecialchars($input->bootFileName) : null;
} catch (Exception $e) { } catch (Exception $e) {
$errorText = $e->getMessage(); $errorText = $e->getMessage();
$this->logger->error(json_encode([ $this->logger->error(json_encode([
@ -1408,8 +1408,7 @@ public function addDhcpHost(Request $request, $subnetId): JsonResponse
$newHost = [ $newHost = [
"hostname" => $host, "hostname" => $host,
"hw-address" => $macAddress, "hw-address" => $macAddress,
"ip-address" => $address, "ip-address" => $address
"boot-file-name" => $bootFileName
]; ];
$subnetFound = false; $subnetFound = false;