From 4beb8db7d68dd823d446d197903a62ca1af697d2 Mon Sep 17 00:00:00 2001 From: Michael Pfeifroth Date: Fri, 14 Aug 2026 13:39:04 +0200 Subject: [PATCH] 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 Ref: https://forum.openwrt.org/t/luci-proto-modemmanager-support-thread/23696/120 Signed-off-by: Michael Pfeifroth --- .../htdocs/luci-static/resources/protocol/modemmanager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js b/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js index 36f7910f4b..6275a7999c 100644 --- a/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js +++ b/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js @@ -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'; } });