summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2020-04-08 17:13:31 +0200
committerJannik Schönartz2020-04-08 17:13:31 +0200
commita9983af0913000bf3116908f7e2b08fe5cc33d7b (patch)
tree70e1f744e4e92ba9cc13e6fd841b0b786bea2c09
parent[permissionmanager] fix bug blacklist getting deleted when resaving (diff)
downloadbas-a9983af0913000bf3116908f7e2b08fe5cc33d7b.tar.gz
bas-a9983af0913000bf3116908f7e2b08fe5cc33d7b.tar.xz
bas-a9983af0913000bf3116908f7e2b08fe5cc33d7b.zip
[server/log] Add log when setting dhcp ip in the client registration failed
-rw-r--r--server/api/registration.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/api/registration.js b/server/api/registration.js
index 5744369..6688b29 100644
--- a/server/api/registration.js
+++ b/server/api/registration.js
@@ -232,6 +232,11 @@ noAuthRouter.postAsync('/clients', async (req, res) => {
dhcp.ref = setIp.id
// Check for errors.
if (setIp.error) {
+ log({
+ category: 'ERROR_DHCP',
+ description: `[${dhcp.backend.id}] Error setting ip ${network.ip} for mac ${network.mac}\nError: ${setIp.msg}`
+ })
+
// Setting the client ip failed
ipSelection = true
delete client.networks[0].dhcp
@@ -248,7 +253,7 @@ noAuthRouter.postAsync('/clients', async (req, res) => {
}
if (ipSelection) {
- // If not check if the client has a leased ipv4 address.
+ // If not: check if the client has a leased ipv4 address.
const ipCheck = await dhcp.instance.checkIp(dhcp.backend.credentials, network.ip)
// Build ipxe and return