luci-mod-network: fix changing ifname in disabled legacy bridge mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 7dde01be3cc197f79bc6812a2c912c1889dbf1ee)
This commit is contained in:
parent
08f5bc236e
commit
9f76002dae
@ -382,16 +382,19 @@ return baseclass.extend({
|
||||
disableLegacyBridging = isIface && deviceSectionExists(null, 'br-%s'.format(ifc.getName()), 'bridge'),
|
||||
o, ss;
|
||||
|
||||
if (isIface) {
|
||||
var type;
|
||||
|
||||
/* If an externally configured br-xxx interface already exists,
|
||||
* then disable legacy bridge configuration */
|
||||
if (disableLegacyBridging) {
|
||||
o = this.addOption(s, gensection, form.HiddenValue, 'type');
|
||||
o.cfgvalue = function() { return '' };
|
||||
type = this.addOption(s, gensection, form.HiddenValue, 'type');
|
||||
type.cfgvalue = function() { return '' };
|
||||
}
|
||||
else if (isIface) {
|
||||
var type;
|
||||
|
||||
else {
|
||||
type = this.addOption(s, gensection, form.Flag, 'type', _('Bridge interfaces'), _('Creates a bridge over specified interface(s)'));
|
||||
}
|
||||
|
||||
type.modalonly = true;
|
||||
type.disabled = '';
|
||||
type.enabled = 'bridge';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user