summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/view
diff options
context:
space:
mode:
authorArjen de Korte <build+lede@de-korte.org>2017-12-08 10:55:18 +0100
committerJo-Philipp Wich <jo@mein.io>2018-01-09 08:08:55 +0100
commit96f6a79eb2c3373797f50fc8b0fde45e95b01a62 (patch)
tree0ab30347694196c93702716fcfdc64a32a27b991 /modules/luci-mod-admin-full/luasrc/view
parent93c830869dde03c726180482554d47b3d3a3cf4b (diff)
luci-mod-admin-full: fix incorrect length of DUID-LL
The length of DUID-LL is 80 bits (16 bit DUID type, 16 bit hardware type, 48 bit mac) which corresponds to 20 nibbles. Also lower the minimum required length of DUID to 20 nibbles in order to allow entering a DUID-LL. Signed-off-by: Arjen de Korte <build+github@de-korte.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm2
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
index ea6ee91c7..28a37dcd9 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
@@ -5,7 +5,7 @@
return duid.substr(16).replace(/(..)(?=..)/g, '$1:').toUpperCase();
// DUID-LL / Ethernet
- if (duid.length === 24 && duid.substr(0, 8) === '00030001')
+ if (duid.length === 20 && duid.substr(0, 8) === '00030001')
return duid.substr(8).replace(/(..)(?=..)/g, '$1:').toUpperCase();
return null;
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
index 18f66c2a8..ff5e26de9 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
@@ -150,7 +150,7 @@
return duid.substr(16).replace(/(..)(?=..)/g, '$1:').toUpperCase();
// DUID-LL / Ethernet
- if (duid.length === 24 && duid.substr(0, 8) === '00030001')
+ if (duid.length === 20 && duid.substr(0, 8) === '00030001')
return duid.substr(8).replace(/(..)(?=..)/g, '$1:').toUpperCase();
return null;