Skip to content

luci-proto-modemmanager: fix iptype default value - #8944

Merged
feckert merged 1 commit into
openwrt:masterfrom
micpf:fix-modemmanager-iptype-default
Aug 18, 2026
Merged

luci-proto-modemmanager: fix iptype default value#8944
feckert merged 1 commit into
openwrt:masterfrom
micpf:fix-modemmanager-iptype-default

Conversation

@micpf

@micpf micpf commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

The iptype and init_iptype ListValue options in modemmanager.js declared ipv4v6 as the default, while the modemmanager package itself defaults to ipv4 (see net/modemmanager README.md).

Since LuCI's form widgets skip writing a UCI option to /etc/config/network when the selected value equals the field's declared default, selecting IPv4/IPv6 (both) in the UI never actually persisted option iptype 'ipv4v6'. On save/apply, modemmanager then fell back to its own default (ipv4), silently downgrading the connection to IPv4-only — making the ipv4v6 option effectively impossible to use through LuCI.

This PR aligns both iptype and init_iptype defaults with the modemmanager package default (ipv4), and drops the now-inaccurate - defaults to IPv4 hint from the ipv4v6 label.

Issue reported by

Originally reported and diagnosed by @moawut on the forum:
https://forum.openwrt.org/t/luci-proto-modemmanager-support-thread/23696/120

openwrt-ai

This comment was marked as resolved.

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>
@micpf
micpf force-pushed the fix-modemmanager-iptype-default branch from 8352451 to e09f743 Compare August 17, 2026 13:11
@micpf

micpf commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Both nits addressed:

  • Added the missing terminating semicolons on the ipv4 value lines in both iptype and init_iptype blocks.
  • Noted the entry reorder (new default ipv4 listed first) explicitly in the commit message.

Force-pushed the updated commit.

openwrt-ai

This comment was marked as resolved.

@feckert
feckert merged commit 4beb8db into openwrt:master Aug 18, 2026
8 checks passed
@feckert

feckert commented Aug 18, 2026

Copy link
Copy Markdown
Member

Thanks merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants