[PATCH luci] luci-mod-network: allow setting bridge device MTU and MAC

Rafał Miłecki zajec5 at gmail.com
Thu May 27 12:01:41 PDT 2021


From: Rafał Miłecki <rafal at milecki.pl>

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 .../htdocs/luci-static/resources/tools/network.js               | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
index 12ed08ad17..199cd0f152 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
@@ -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');
 
-- 
2.26.2




More information about the openwrt-devel mailing list