diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-07-03 07:20:30 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-07-03 07:20:37 +0200 |
commit | 91f46d765b36825fcfe63e2b7d4863de00cdc69d (patch) | |
tree | cd3bb76908f2670a1bce19a735d789f9a967b8c8 /modules/luci-mod-network/htdocs/luci-static/resources/view | |
parent | 9866bfe13ce2bed07453cce968f670e00a0d7517 (diff) |
Revert "luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed"
This reverts commit 463e910119813aaea0755ff5c16c91ce412a8cbb.
This change causes the entire static lease to get deleted when attempting
to change the MAC address.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 4dd90cc326..c5700a822c 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -473,25 +473,6 @@ return view.extend({ so.value(mac, hint ? '%s (%s)'.format(mac, hint) : mac); }); - so.write = function(section, value) { - var ip = this.map.lookupOption('ip', section)[0].formvalue(section); - var hosts = uci.sections('dhcp', 'host'); - var section_removed = false; - - for (var i = 0; i < hosts.length; i++) { - if (ip == hosts[i].ip) { - uci.set('dhcp', hosts[i]['.name'], 'mac', [hosts[i].mac, value].join(' ')); - uci.remove('dhcp', section); - section_removed = true; - break; - } - } - - if (!section_removed) { - uci.set('dhcp', section, 'mac', value); - } - } - so = ss.option(form.Value, 'ip', _('<abbr title="Internet Protocol Version 4">IPv4</abbr>-Address')); so.datatype = 'or(ip4addr,"ignore")'; so.validate = function(section, value) { |