mirror of
https://github.com/openwrt/luci.git
synced 2026-10-12 05:07:26 +04:00
luci-proto-modemmanager: fix iptype default value
The 'iptype' and 'init_iptype' ListValue options declared 'ipv4v6' as
the default in LuCI, while the modemmanager package itself defaults to
'ipv4' (see net/modemmanager README.md).
Since LuCI omits writing a UCI option when the selected value matches
the field's declared default, selecting 'IPv4/IPv6 (both)' in the UI
never actually saved 'option iptype ipv4v6' to /etc/config/network.
On the next apply, modemmanager fell back to its own default ('ipv4'),
silently downgrading the connection to IPv4-only and making the
'ipv4v6' option effectively unusable through LuCI.
Align both defaults with the modemmanager package default ('ipv4') and
drop the now-inaccurate '- defaults to IPv4' hint from the 'ipv4v6'
label. The dropdown entries are also reordered so the new default
('ipv4') is listed first, matching the convention used by other
ListValue fields in this file.
Reported-by: moawut <https://forum.openwrt.org/u/moawut>
Ref: https://forum.openwrt.org/t/luci-proto-modemmanager-support-thread/23696/120
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
This commit is contained in:
1 parent
c26820a229
commit
4beb8db7d6
1 file changed
+4
-4
+4
-4
@@ -140,10 +140,10 @@ return network.registerProtocol('modemmanager', {
|
||||
o.password = true;
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'iptype', _('IP Type'));
|
||||
o.value('ipv4v6', _('IPv4/IPv6 (both - defaults to IPv4)'))
|
||||
o.value('ipv4', _('IPv4 only'));
|
||||
o.value('ipv6', _('IPv6 only'));
|
||||
o.default = 'ipv4v6';
|
||||
o.value('ipv4v6', _('IPv4/IPv6 (both)'));
|
||||
o.default = 'ipv4';
|
||||
|
||||
o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
|
||||
o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
|
||||
@@ -197,9 +197,9 @@ return network.registerProtocol('modemmanager', {
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'init_iptype', _('Initial EPS Bearer IP Type'));
|
||||
o.depends('init_epsbearer', 'custom');
|
||||
o.value('ipv4v6', _('IPv4/IPv6 (both - defaults to IPv4)'))
|
||||
o.value('ipv4', _('IPv4 only'));
|
||||
o.value('ipv6', _('IPv6 only'));
|
||||
o.default = 'ipv4v6';
|
||||
o.value('ipv4v6', _('IPv4/IPv6 (both)'));
|
||||
o.default = 'ipv4';
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user