mirror of
https://github.com/openwrt/luci
synced 2025-01-09 04:28:37 +08:00
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>
This commit is contained in:
parent
bbb3c4c4a5
commit
79947af064
@ -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)';
|
||||
}
|
||||
});
|
||||
|
@ -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';
|
||||
}
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ return network.registerProtocol('hnet', {
|
||||
},
|
||||
|
||||
renderFormOptions: function(s) {
|
||||
var dev = this.getL2Device() || this.getDevice(), o;
|
||||
var o;
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'mode', _('Category'));
|
||||
o.value('auto', _('Automatic'));
|
||||
@ -32,13 +32,5 @@ return network.registerProtocol('hnet', {
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'dnsname', _('DNS-Label / FQDN'));
|
||||
o.default = s.section;
|
||||
|
||||
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';
|
||||
}
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ return network.registerProtocol('dhcpv6', {
|
||||
},
|
||||
|
||||
renderFormOptions: function(s) {
|
||||
var dev = this.getL2Device() || this.getDevice(), o;
|
||||
var o;
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'reqaddress', _('Request IPv6-address'));
|
||||
o.value('try');
|
||||
@ -32,13 +32,5 @@ return network.registerProtocol('dhcpv6', {
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'clientid', _('Client ID to send when requesting DHCP'));
|
||||
o.datatype = 'hexstring';
|
||||
|
||||
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)';
|
||||
}
|
||||
});
|
||||
|
@ -59,11 +59,6 @@ return network.registerProtocol('vxlan', {
|
||||
o.nocreate = true;
|
||||
o.optional = true;
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'), _('Specify an MTU (Maximum Transmission Unit) other than the default (1280 bytes).'));
|
||||
o.optional = true;
|
||||
o.placeholder = 1280;
|
||||
o.datatype = 'range(68, 9200)';
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'ttl', _('Override TTL'), _('Specify a TTL (Time to Live) for the encapsulating packet other than the default (64).'));
|
||||
o.optional = true;
|
||||
o.placeholder = 64;
|
||||
@ -73,10 +68,6 @@ return network.registerProtocol('vxlan', {
|
||||
o.optional = true;
|
||||
o.datatype = 'range(0, 255)';
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address'));
|
||||
o.optional = true;
|
||||
o.datatype = 'macaddr';
|
||||
|
||||
o = s.taboption('advanced', form.Flag, 'rxcsum', _('Enable rx checksum'));
|
||||
o.optional = true;
|
||||
o.default = o.enabled;
|
||||
|
@ -54,11 +54,6 @@ return network.registerProtocol('vxlan6', {
|
||||
o.nocreate = true;
|
||||
o.optional = true;
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'), _('Specify an MTU (Maximum Transmission Unit) other than the default (1280 bytes).'));
|
||||
o.optional = true;
|
||||
o.placeholder = 1280;
|
||||
o.datatype = 'range(68, 9200)';
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'ttl', _('Override TTL'), _('Specify a TTL (Time to Live) for the encapsulating packet other than the default (64).'));
|
||||
o.optional = true;
|
||||
o.placeholder = 64;
|
||||
@ -68,10 +63,6 @@ return network.registerProtocol('vxlan6', {
|
||||
o.optional = true;
|
||||
o.datatype = 'range(0, 255)';
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address'));
|
||||
o.optional = true;
|
||||
o.datatype = 'macaddr';
|
||||
|
||||
o = s.taboption('advanced', form.Flag, 'rxcsum', _('Enable rx checksum'));
|
||||
o.optional = true;
|
||||
o.default = o.enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user