diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-05-28 09:58:12 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-05-28 15:34:41 +0200 |
commit | 79947af064122438c803f3b7bc580ede093a26e4 (patch) | |
tree | 60c99bef5a3042efcf7e10e61e74753d68cd664e /modules/luci-base | |
parent | bbb3c4c4a59bc01e2f18d98596af1af354568fdd (diff) |
treewide: drop MAC and MTU from interfaces (protocols)
Those are L2 options that are not part of interfaces (L3), should not be
set there and don't work. Setting MAC and MTU should be done at device
layer (config device) and is supported for basic types already.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js | 10 | ||||
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/protocol/static.js | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js b/modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js index 9a63a107cf..71adc235ca 100644 --- a/modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js +++ b/modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js @@ -17,7 +17,7 @@ return network.registerProtocol('dhcp', { }, renderFormOptions: function(s) { - var dev = this.getL2Device() || this.getDevice(), o; + var o; o = s.taboption('general', form.Value, 'hostname', _('Hostname to send when requesting DHCP')); o.default = ''; @@ -38,13 +38,5 @@ return network.registerProtocol('dhcp', { o.datatype = 'hexstring'; s.taboption('advanced', form.Value, 'vendorid', _('Vendor Class to send when requesting DHCP')); - - o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address')); - o.datatype = 'macaddr'; - o.placeholder = dev ? (dev.getMAC() || '') : ''; - - o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU')); - o.placeholder = dev ? (dev.getMTU() || '1500') : '1500'; - o.datatype = 'max(9200)'; } }); 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 82f499d6b9..42ebcefba4 100644 --- a/modules/luci-base/htdocs/luci-static/resources/protocol/static.js +++ b/modules/luci-base/htdocs/luci-static/resources/protocol/static.js @@ -173,7 +173,7 @@ return network.registerProtocol('static', { }, renderFormOptions: function(s) { - var dev = this.getL2Device() || this.getDevice(), o; + var o; s.taboption('general', this.CBIIPValue, 'ipaddr', _('IPv4 address')); s.taboption('general', this.CBINetmaskValue, 'netmask', _('IPv4 netmask')); @@ -192,13 +192,5 @@ return network.registerProtocol('static', { o = s.taboption('general', form.Value, 'ip6prefix', _('IPv6 routed prefix'), _('Public prefix routed to this device for distribution to clients.')); o.datatype = 'ip6addr'; o.depends('ip6assign', ''); - - o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address')); - o.datatype = 'macaddr'; - o.placeholder = dev ? (dev.getMAC() || '') : ''; - - o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU')); - o.datatype = 'max(9200)'; - o.placeholder = dev ? (dev.getMTU() || '1500') : '1500'; } }); |