luci-mod-network: allow setting bridge device MTU and MAC
authorRafał Miłecki <rafal@milecki.pl>
Thu, 27 May 2021 19:01:41 +0000 (21:01 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 28 May 2021 13:44:44 +0000 (15:44 +0200)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit bbb3c4c4a59bc01e2f18d98596af1af354568fdd)

modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index 12ed08ad17da034426107a5f8561e2fa38046cfd..199cd0f152e3da45fa95961bea816fe660babd54 100644 (file)
@@ -610,11 +610,13 @@ return baseclass.extend({
                o.placeholder = getDeviceValue(dev, 'getMTU');
                o.datatype = 'max(9200)';
                o.depends('type', '');
+               o.depends('type', 'bridge');
 
                o = this.addOption(s, 'devgeneral', form.Value, 'macaddr', _('MAC address'));
                o.placeholder = getDeviceValue(dev, 'getMAC');
                o.datatype = 'macaddr';
                o.depends('type', '');
+               o.depends('type', 'bridge');
                o.depends('type', 'macvlan');
                o.depends('type', 'veth');