Revert "luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed"
This reverts commit463e910119
. 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> (cherry picked from commit91f46d765b
)
This commit is contained in:
parent
0ededb9bcc
commit
afea1dac74
1 changed files with 0 additions and 19 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue