mirror of
https://github.com/Akkadius/glass-isc-dhcp.git
synced 2025-07-29 16:45:48 +02:00
Fix some potential lease parser crashes
This commit is contained in:
parent
5a2cd55414
commit
ac87206551
@ -64,6 +64,12 @@ module.exports = {
|
|||||||
if (typeof line_data_arg[2] !== "undefined") {
|
if (typeof line_data_arg[2] !== "undefined") {
|
||||||
dhcp_lease_data[ip_address].mac = line_data_arg[2].replace(/;/gi, '').trim();
|
dhcp_lease_data[ip_address].mac = line_data_arg[2].replace(/;/gi, '').trim();
|
||||||
|
|
||||||
|
if (dhcp_lease_data[ip_address].mac.split(":").join("").trim() == "")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (dhcp_lease_data[ip_address].mac.split(":").join("").toUpperCase().trim() == "")
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Mac OUI Lookup */
|
/* Mac OUI Lookup */
|
||||||
var mac_oui = dhcp_lease_data[ip_address].mac.split(":").join("").toUpperCase().slice(0, 6);
|
var mac_oui = dhcp_lease_data[ip_address].mac.split(":").join("").toUpperCase().slice(0, 6);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user