diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-10-15 09:14:36 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-10-15 09:14:56 +0200 |
commit | 120ece921dcbf6b92e593f5efa0d59c18373c9a4 (patch) | |
tree | 22fbf94c781428be98cea591dc6085db35c7d58d /modules/luci-base/htdocs | |
parent | af040702da028f4a349b3d7d50f68e629cabd5eb (diff) |
luci-base: static.js: make IPv6 assignment hint optional
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/protocol/static.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/protocol/static.js b/modules/luci-base/htdocs/luci-static/resources/protocol/static.js index 8470e0a20e..9039acd5f3 100644 --- a/modules/luci-base/htdocs/luci-static/resources/protocol/static.js +++ b/modules/luci-base/htdocs/luci-static/resources/protocol/static.js @@ -189,6 +189,9 @@ return network.registerProtocol('static', { o = s.taboption('general', form.Value, 'ip6hint', _('IPv6 assignment hint'), _('Assign prefix parts using this hexadecimal subprefix ID for this interface.')); o.placeholder = '0'; o.validate = function(section_id, value) { + if (value == null || value == '') + return true; + var n = parseInt(value, 16); if (!/^(0x)?[0-9a-fA-F]+$/.test(value) || isNaN(n) || n >= 0xffffffff) |