Repository navigation
feat(start-wrt): show what a page cannot represent in place of its settings - #4611
Conversation
uciedit tokenized values with inpt's Quoted/SingleQuoted/Spaced, which
does not match libuci. libuci writes an apostrophe as '\'' on every
commit (LuCI Save & Apply, `uci commit`, StartWRT's own WAN-schedule
cron job), and uciedit's lazy single-quote match stopped at the first
quote with no backtracking, so the whole file failed with BadOption.
It also unescaped backslashes inside single quotes, which libuci keeps
literally, and wrote values containing an apostrophe with Rust's {:?}
double-quoting, whose \n and \u{..} escapes libuci reads as letters.
The tokenizer now follows libuci's parse_str: adjacent quoted and
unquoted pieces join, single-quoted text is literal, a backslash
elsewhere keeps the next character or continues the line, quoted
values may span lines, an unquoted # starts a comment and ; ends a
statement. It also accepts package lines, the one-letter keywords and
an option with no value, as libuci does. Tokens keep their source
text, so untouched lines still round-trip byte for byte; new values
are written in libuci's quoting.
Closes #4600
…exer tests A value quoted with no inner apostrophe decodes without copying, which is nearly every line libuci writes. Tests add CRLF continuation, \#, a quote followed directly by #, a backslash at end of input, and the empty word. The fragment is selected for release notes: one apostrophe saved through LuCI made a whole config unreadable.
…ting A file that ends in an unmatched backslash lexes as a token whose raw text ends in that backslash. Written back unchanged, the newline the dump adds after it became a line continuation, so an option appended to that section joined the previous value and the saved file failed with too many arguments. Display now re-quotes the decoded value when the raw text ends in a dangling escape, including a backslash before a bare carriage return. Found by review on #4602.
…ttings A hand edit or a LuCI change StartWRT cannot represent made the affected page fail with a red toast every five seconds, show wrong values, or overwrite the change on save, and two boot repairs acted on settings they could not read. config.check reads ddns, dhcp, firewall, network, startwrt and wireless and reports each finding with its file, one-based line, section, option and value, and the pages it affects: - a file that does not parse, for every page that reads it; - a section that fails its typed read, for the pages whose requests read it (interfaces, devices, bridge VLANs, wifi devices and interfaces, the LAN and profile DHCP sections, zones, forwardings, profiles); - values a page reads but cannot show or keep: a WAN or WAN6 protocol the WAN page has no mode for, a LAN or profile interface that is not static, an RA or DHCPv6 mode other than server/disabled, a DHCP section set to ignore, a second access point on a radio, a non-AP, disabled or non-LAN Wi-Fi interface, encryption other than psk2/none, a lease with several MACs; - sections a page requires: br-lan, lan, wan, the wan zone, and each profile's interface; - as a notice rather than a block, the entries after the first of a `list ipaddr` or `list ip6addr`, which the page reads past and a save leaves in place. The shell shows CustomConfig in place of a page with blocking findings, with a link to LuCI and a recheck, and ConfigNotices above a page with notices. FormService hands a load error from configuration StartWRT cannot read or model to the same page instead of toasting it on every poll. Forms StartWRT can read without loss are read rather than flagged. A `Vec` field reads an `option` line as its whitespace-separated words, so `option proto 'udp'` on a LuCI rule no longer reads as every protocol in the reserved-port and inbound checks. `#[uci(accept_list)]` reads the first item of a `list` and a write replaces that item and keeps the rest; it now covers DhcpHost.mac, NetworkInterface.ipaddr and ip6addr. ipaddr is an Ipv4Address that keeps a prefix length, with ipv4() and ipv4_netmask() giving callers the address and the mask the prefix implies. uciedit tokens keep their file line, typed-read errors name the option and value they could not read, MissingOption and ExpectedSectionType point at the section header, ConfigBytes keeps the line when it adds the file name, and parse_each parses files independently. heal_ipv6_state now acts only on a dhcp.lan in the off state StartWRT writes, so an unreadable section or a LuCI relay no longer turns IPv6 off at boot, and bootstrap_admin_profile no longer appends a second Admin profile when the existing one fails its typed read. Refs #3678, #4607
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on three correctness issues in f83a575:
-
P2 — Background form errors can block an unrelated page.
web/src/app/services/form.service.tsnow forwards errors toConfigCheckService.report, which assigns them to the current URL. However,ProfilesService,OutboundServiceandBlackoutServiceare root-provided: theirtoSignalsubscriptions and five-second polls survive navigation. For example, visit Profiles, navigate to WAN, then make a profile'svlan_tagunreadable. The surviving Profiles poll reports code 1022 againstwan, replacing an otherwise working WAN page. Navigation clears the latch only until the next poll. The proposal scopes these pollers to their consuming components, including a separate OutboundService instance for Profiles, using the existing component-provider convention. -
P2 — Accepted CIDR LAN masks can be silently overwritten.
backend/ctrl/src/config_check.rs::static_addressaccepts a static192.168.1.1/16address without a finding. The newIpv4Addressreader makes that configuration load successfully, but the LAN form discards the response's netmask andlan.ipv4-setwritesLAN_NETMASK(/24); profile edits also write /24. A save therefore changes a custom network the page cannot represent instead of directing the user to LuCI. The proposal reports non-/24 LAN/profile masks as blocking findings, reusingLAN_NETMASKandipv4_netmask(), with regression cases for scalar CIDR, list CIDR and separate netmask forms. -
P2 — Typed writes can resurrect overridden addresses. In
backend/uciedit_macros/src/lib.rs, theaccept_listwriter preserves every list entry after the first, even when a lateroptionhad overridden those entries. Forlist ipaddr A; list ipaddr B; option ipaddr C, the typed reader selects C, but writing C producesoption ipaddr C; list ipaddr B, making B effective again. The proposal discards overridden entries before writing and extends the existing precedence test to cover multiple overridden entries and a genuinely effective secondary address after the final option.
Proposed changes: f83a575...proposal/4611
Reviewed against the actual stacked base, wrt/uciedit-libuci-quoting; merge-tree reports a clean merge. Static review only: no builds, tests, typechecks or linters run; the proposed regression cases are unexecuted. The reported Conflict Markers check remains queued. The PR branch is untouched.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
An `option ipaddr` replaces every earlier `ipaddr` line, and typed writes now discard those lines. The second-address notice still took the first `list` item whenever an `option` was present, so it could name an address the option overrides, and the non-/24 mask finding pointed at the first `option ipaddr` rather than the last one the typed reader keeps. Both now use the values libuci ends with.
A typed write now drops the lines a later `option` overrides, so the attribute's docs and the ipaddr/ip6addr field comments no longer keep "the rest" as written.
f83a575 to
a44937e
Compare
409789e to
6a01961
Compare
helix-white
left a comment
There was a problem hiding this comment.
Approved at a44937ef8. git merge-tree against wrt/uciedit-libuci-quoting is clean. All three points from my last review are resolved, and I found no new blocking defects:
- Background errors blocking other pages: resolved by adopting the proposal. No root-provided
FormServiceremains, and every injection site of the three re-scoped services sits under its new provider. The Outbound table and VPN child routes share one instance from theOutboundshell, and Profiles has its own. - Custom LAN masks: resolved. The finding now also reports the last
option ipaddr, which is the value the typed reader keeps. - Resurrected addresses: resolved. The author's new
effective()helper also stops the second-address notice from naming an address anoptionoverrode. It agrees with the reader and with the writer's discard for every order ofoptionandlistlines I traced, and the docs now say the same.
This verdict comes from reading the code. I ran no tests. I built a throwaway mock UI only to capture screenshots, which follow in a separate comment.
Brief
Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?
Summary
config.checkreadsddns,dhcp,firewall,network,startwrtandwireless, and reports what a page cannot represent, with file, line, section, option and value.- A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced, so backup, factory reset and the LuCI link stay reachable.
- Extra
list ipaddrorlist ip6addrentries are a notice above the page, not a block. - A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll. The page clears on navigation and reports again if the load still fails.
- Additional fixes:
heal_ipv6_stateacts only on adhcp.lanin the off state StartWRT writes.bootstrap_admin_profileno longer adds a second Admin profile when the existing one fails its typed read.- A
Vecfield readsoption proto 'udp'as words. It used to read as an empty list, which the reserved-port and inbound checks treat as every protocol. - Typed-read errors name the line, option and value.
Implementation diff: +1495 / −124 lines in 36 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.
Data model
- New
config.checkRPC returningConfigCheck { findings: ConfigFinding[] }, withConfigViewandConfigProblemin the bindings. It is additive for API callers. NetworkInterface.ipaddrbecomesIpv4Address, which keeps an optional prefix length.ipv4()andipv4_netmask()give callers the address and mask, and the prefix wins overnetmask, as in netifd.- Nothing changes on disk until a save. A typed write of an
accept_listfield (DhcpHost.mac,ipaddr,ip6addr) replaces the effective value, keeps the items after it and removes the lines anoptionoverrode.
Approach
- Form errors reach
ConfigCheckServicethrough the existingFormService, and the findings go through the shell'sblockedstate, so no page needed its own handling. ProfilesService,OutboundServiceandBlackoutServicemove from root scope to component scope, the convention every other form service already uses. A failure is attributed to the current URL, so a root poller that outlived its page could block an unrelated one. These pollers now stop when the user leaves the page and start with no data when the user returns.- This review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added
effective().
Flags
- Stale description: it doesn't mention the /24 block. "A write replaces that item and keeps the rest" no longer holds when an
optionoverrides earlier lines. The bench scenario "a CIDR LAN address with nonetmask… 0 findings, and the LAN page renders" now holds only for a /24 prefix. I have not edited the author's text. - Duplicate scalar options (not changed here): non-
accept_listfields such asnetmaskstill read the firstoptionwhile libuci keeps the last. The base branch already does this. A hand-written duplicatenetmaskcould therefore hide a non-/24 mask from the new finding. - Merge order: stacked on #4602, which is still open. #4601 and #4607 are separate follow-ups, as the description says.
Testing
- Recorded by the author in the description:
make start-wrt-test(820startwrt-core, 36uciedit),check:wrt,check:i18n:wrt, the bindings check and the format check. The bench router ran its scenarios, a reboot and a snapshot restore. - Not shown to cover this head: the description doesn't name the commit these ran on, and its text predates the last four commits. The PR records no test or bench run for the page-scoped pollers, the /24 finding, the discard logic or
effective(), or for their new regression cases. - CI: only
Conflict Markersis reported on this head, with one run cancelled and one queued. No build or test job has reported. - Not exercised, per the description: a real LuCI session, a real Wi-Fi client,
os-bench(unreachable), and translation review by native speakers.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
|
@Dominion5254 This PR now targets
I'm this PR's reviewer, not its implementer, so I haven't pushed to your branch. Once you've merged |
Dismissed by Helix: the changes require a substantive PR brief update. The head adds a blocking Unsupported finding for any LAN or profile interface mask other than /24 (LAN_NETMASK), from either a CIDR prefix or netmask. The description lists no such finding, and its bench claim that a CIDR LAN address yields 0 findings and the LAN page renders now holds only for /24. accept_list writes now remove the lines a later option overrides, and notices and findings use libuci's effective values (last option, else first item), so the description's 'a write replaces that item and keeps the rest' and 'entries after the first' are wrong when an option is present. ProfilesService, OutboundService and BlackoutService moved from root to page-scoped providers, so they stop polling when you leave the page; the description doesn't mention this.
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
|
Merged How the conflicts were resolved
Extra fix: master did not compile Verification on
Not changed: the approval brief's open points still stand. The /24 block needs a maintainer decision, and duplicate scalar options still read the first value. |
|
The |
helix-white
left a comment
There was a problem hiding this comment.
Approved at 1cce09a35. git merge-tree against current master (04fff2e12) is clean. Since my approval at a44937ef8, two commits were added: the merge of master (6f907cff0) and a one-line fix (1cce09a35). I read the remerge diff of every conflicted file and the fix.
uciedit/src/syntax.rs: the resolution is master's file with this PR's token line numbers,header_srcand located errors applied on top. That includes master's newSection::set_name. Master's newTokenconstructors carryline: None, so nothing reached through master's code loses its line.devices.rs: the PR's inline profile-network code gives way to master's sharedreservations::profile_networks. The merge changes that function to readipv4()/ipv4_netmask(), so a CIDRipaddrstill yields its profile subnet. Every remaining non-test read ofipaddrornetmaskinctrlgoes through those accessors or writes the field.published_ports.rs: master deletedaffected_wifi_ports_for_vacated_profiles, so the PR's CIDR edit to it correctly disappears with it.profiles.rs: both sides are kept, master'sname_profile_firewall_sectionsand the PR'sheal_ipv6_statedoc.- i18n: the PR's 12 strings move to keys 619–630 in all five dictionaries with unchanged text. They don't collide with master's 602–618.
1cce09a35:origin/masteris missing theMigration::purposearm forNameProfileFirewallSections, sostartwrt-coredoes not compile there. The added arm is the fix that's needed.- No new root-scoped pollers: master added no root-provided
FormServicethat could misattribute a load error to another page.
This verdict comes from reading the code. I ran nothing this round.
Brief
Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?
Summary
config.checkreadsddns,dhcp,firewall,network,startwrtandwireless, and reports what a page cannot represent, with file, line, section, option and value.- A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
- An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last
optionand anylistitems after it, otherwise everylistitem. - A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
- Additional fixes:
heal_ipv6_stateacts only on adhcp.lanin the off state StartWRT writes.bootstrap_admin_profileno longer adds a second Admin profile when the existing one fails its typed read.- A
Vecfield readsoption proto 'udp'as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration. - Typed-read errors name the line, option and value.
- Profile subnets from
reservations::profile_networksrespect a CIDRipaddr. - Master's missing
Migration::purposearm is added, which restores thestartwrt-corebuild.
Implementation diff: +1493 / −122 lines in 36 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.
Data model
- New
config.checkRPC returningConfigCheck { findings: ConfigFinding[] }, withConfigViewandConfigProblem. It is additive for API callers. NetworkInterface.ipaddrbecomesIpv4Address, which keeps a prefix length, and the prefix wins overnetmask, as in netifd.- Nothing changes on disk until a save. A typed write of an
accept_listfield (DhcpHost.mac,ipaddr,ip6addr) replaces the effective value, keeps the items after it and removes the lines anoptionoverrode.
Approach
- Form errors reach
ConfigCheckServicethrough the existingFormService.ProfilesService,OutboundServiceandBlackoutServicemove to component scope, like every other form service, so a poller cannot outlive its page and block another one. - My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added
effective().
Flags
- Stale description: the PR description still says it is stacked on #4602 (now in
master). It doesn't mention the /24 block or the page-scoped pollers. It describesaccept_listwrites as keeping "the rest", which is wrong when anoptionoverrides earlier lines. I have not edited the author's text. - Duplicate scalar options (not changed here): non-
accept_listfields such asnetmaskstill read the firstoptionwhile libuci keeps the last. A hand-written duplicatenetmaskcould therefore hide a non-/24 mask from the new finding.
Testing
- After the merge, on
1cce09a35: the implementing session reports thatmake start-wrt-testpasses (889startwrt-core, 37uciedit). It also reports passingcheck:wrt,check:i18n:wrt, the RPC-bindings check andformat-check, none of which regenerated anything. - Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
- CI on this head: Conflict Markers, Prettier and change detection pass. Automated Tests, Formatting & Lockfiles, Generated Artifacts, Dependency Licenses, Changelog fragments and the riscv64 binary build are pending.
- Not exercised: a real LuCI session, a real Wi-Fi client,
os-bench, and translation review by native speakers.
Screenshots (the UI is unchanged since a44937ef8; the merge only renumbered translation keys)
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Dismissed by Helix: the changes require a substantive PR brief update. Between a44937e and 1cce09a the PR was retargeted to master and merged with master f4ae12b, and it gained a commit with new scope. 1cce09a adds the Migration::purpose arm for NameProfileFirewallSections, which restores the startwrt-core build on origin/master. The approved brief's list of additional fixes does not include this. The approved brief also said the PR was stacked on #4602, which was still open; #4602 has since merged and the PR now targets master, so that merge-order fact is wrong. The merge resolution also moves the PR's CIDR-aware profile-subnet logic into master's shared reservations::profile_networks (the merge commit edits it to use ipv4()/ipv4_netmask()), and the PR's edit to the deleted affected_wifi_ports_for_vacated_profiles is gone. The brief needs updating for the new fix and the retarget.
|
|
…-config Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b # Conflicts: # projects/start-wrt/backend/ctrl/src/migrate.rs
|
Merged
|
helix-white
left a comment
There was a problem hiding this comment.
Approved at 1307b29c3. git merge-tree against current master is clean. Since my approval at 1cce09a35, the only new commit is the merge of master (0b69dc3fb). Its one conflict was in ctrl/src/migrate.rs, where #4656 had landed master's own Migration::purpose arm for NameProfileFirewallSections. The resolution takes master's wording, so this PR no longer touches migrate.rs. Within projects/start-wrt, this merge changed only docs/src/faq.md and migrate.rs, and neither interacts with this PR's changes. The merge resolutions I checked at 1cce09a35 carry over unchanged. This verdict comes from reading the code; I ran nothing.
Brief
Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?
Summary
config.checkreadsddns,dhcp,firewall,network,startwrtandwireless, and reports what a page cannot represent, with file, line, section, option and value.- A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
- An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last
optionand anylistitems after it, otherwise everylistitem. - A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
- Additional fixes:
heal_ipv6_stateacts only on adhcp.lanin the off state StartWRT writes.bootstrap_admin_profileno longer adds a second Admin profile when the existing one fails its typed read.- A
Vecfield readsoption proto 'udp'as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration. - Typed-read errors name the line, option and value.
- Profile subnets from
reservations::profile_networksrespect a CIDRipaddr.
Implementation diff: +1490 / −122 lines in 35 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.
Data model
- New
config.checkRPC returningConfigCheck { findings: ConfigFinding[] }, withConfigViewandConfigProblem. It is additive for API callers. NetworkInterface.ipaddrbecomesIpv4Address, which keeps a prefix length, and the prefix wins overnetmask, as in netifd.- Nothing changes on disk until a save. A typed write of an
accept_listfield (DhcpHost.mac,ipaddr,ip6addr) replaces the effective value, keeps the items after it and removes the lines anoptionoverrode.
Approach
- Form errors reach
ConfigCheckServicethrough the existingFormService.ProfilesService,OutboundServiceandBlackoutServicemove to component scope, like every other form service, so a poller cannot outlive its page and block another one. - My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added
effective().
Flags
- Stale description: the PR description still says it is stacked on #4602 (now in
master). It doesn't mention the /24 block or the page-scoped pollers. It describesaccept_listwrites as keeping "the rest", which is wrong when anoptionoverrides earlier lines. I have not edited the author's text. - Duplicate scalar options (not changed here): non-
accept_listfields such asnetmaskstill read the firstoptionwhile libuci keeps the last. A hand-written duplicatenetmaskcould therefore hide a non-/24 mask from the new finding.
Testing
- On
1307b29c3: the implementing session reports thatmake start-wrt-testpasses (889startwrt-core, 37uciedit). It reports passingcheck:wrt,check:i18n:wrt, the RPC-bindings check andformat-checkon1cce09a35. The latest merge touched onlymigrate.rsand a docs page. - Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
- CI on this head: Conflict Markers and change detection pass. Prettier, Changelog fragments and the riscv64 binary build are pending.
- Not exercised: a real LuCI session, a real Wi-Fi client,
os-bench, and translation review by native speakers.
Screenshots (the UI is unchanged since a44937ef8; the merge only renumbered translation keys)
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Dismissed by Helix: the changes require a substantive PR brief update. The approved brief at 1cce09a listed an additional fix: this PR adds master's missing Migration::purpose arm for NameProfileFirewallSections and so restores the startwrt-core build. The merge 1307b29 of master 0b69dc3 resolved the migrate.rs conflict to master's own arm from #4656, and migrate.rs now matches master, so the PR no longer contains that fix and the brief's scope must drop it. The rest of the endpoint diff is identical to master's own changes from f4ae12b to 0b69dc3 (within start-wrt only docs/src/faq.md), and the PR's other behaviour is unchanged.
…-config Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b # Conflicts: # projects/start-wrt/web/src/app/i18n/dictionaries/de.ts # projects/start-wrt/web/src/app/i18n/dictionaries/en.ts # projects/start-wrt/web/src/app/i18n/dictionaries/es.ts # projects/start-wrt/web/src/app/i18n/dictionaries/fr.ts # projects/start-wrt/web/src/app/i18n/dictionaries/pl.ts
|
Merged
|
helix-white
left a comment
There was a problem hiding this comment.
Approved at 5ade4f2ad. git merge-tree against current master is clean. Since my approval at 1307b29c3, the only new commit is the merge of master (69e08770e, on master). Its only conflicts were the five StartWRT dictionaries. #4470 took keys 619–620 for its Wi-Fi password strings, so this PR's 12 strings move to 621–632 in every language with unchanged text. Each dictionary has all 14 keys from 619 to 632, with master's two followed by this PR's twelve. Apart from that, the merge only brings in master's own changes to the Wi-Fi password dialog, help, docs and changelog. It adds no root-provided FormService and touches no code this PR changed. This verdict comes from reading the code; I ran nothing.
Brief
Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?
Summary
config.checkreadsddns,dhcp,firewall,network,startwrtandwireless, and reports what a page cannot represent, with file, line, section, option and value.- A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
- An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last
optionand anylistitems after it, otherwise everylistitem. - A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
- Additional fixes:
heal_ipv6_stateacts only on adhcp.lanin the off state StartWRT writes.bootstrap_admin_profileno longer adds a second Admin profile when the existing one fails its typed read.- A
Vecfield readsoption proto 'udp'as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration. - Typed-read errors name the line, option and value.
- Profile subnets from
reservations::profile_networksrespect a CIDRipaddr.
Implementation diff: +1490 / −122 lines in 35 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.
Data model
- New
config.checkRPC returningConfigCheck { findings: ConfigFinding[] }, withConfigViewandConfigProblem. It is additive for API callers. NetworkInterface.ipaddrbecomesIpv4Address, which keeps a prefix length, and the prefix wins overnetmask, as in netifd.- Nothing changes on disk until a save. A typed write of an
accept_listfield (DhcpHost.mac,ipaddr,ip6addr) replaces the effective value, keeps the items after it and removes the lines anoptionoverrode.
Approach
- Form errors reach
ConfigCheckServicethrough the existingFormService.ProfilesService,OutboundServiceandBlackoutServicemove to component scope, like every other form service, so a poller cannot outlive its page and block another one. - My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added
effective().
Flags
- Stale description: the PR description still says it is stacked on #4602 (now in
master). It doesn't mention the /24 block or the page-scoped pollers. It describesaccept_listwrites as keeping "the rest", which is wrong when anoptionoverrides earlier lines. I have not edited the author's text. - Duplicate scalar options (not changed here): non-
accept_listfields such asnetmaskstill read the firstoptionwhile libuci keeps the last. A hand-written duplicatenetmaskcould therefore hide a non-/24 mask from the new finding.
Testing
- Reported by the implementing session:
make start-wrt-testpasses on1307b29c3(889startwrt-core, 37uciedit).check:i18n:wrt,check:wrtand Prettier on the dictionaries pass on5ade4f2ad. The RPC-bindings check andformat-checkpassed on1cce09a35. - Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
- CI on this head: Conflict Markers and change detection pass. Prettier, Changelog fragments and the riscv64 binary build are pending.
- Not exercised: a real LuCI session, a real Wi-Fi client,
os-bench, and translation review by native speakers.
Screenshots (the UI is unchanged since a44937ef8; the merges only renumbered translation keys)
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…Wireless WAN page config.check from Start9Labs#4611 reported every client-mode wifi-iface whose network is not lan as Unsupported for the Wi-Fi page, so joining a network from Wireless WAN replaced the Wi-Fi page with Custom configuration, naming the section StartWRT had just written. The Wi-Fi page now skips client interfaces: it never writes them, and wifi.set refuses to turn off a radio one uses. An enabled one set up outside StartWRT is a notice on the Wi-Fi page instead, since its band follows the upstream channel and stays on. Wireless WAN becomes the `wwan` view: a syntax error in wireless, network, firewall or startwrt, an unreadable radio, station or route metric, a missing wan zone, or an encryption on wireless.wwan the page cannot show now replaces it with Custom configuration. wwan.get raises CorruptedWifi rather than InvalidValue for that encryption, so a load that races the check hands off to the same page instead of toasting. Start9Labs#4611's list reading also fixes the zone write: a wan zone written as `option network 'wan wan6'` gains and loses wwan as list entries, with a test.






Refs #3678 (the MVP; the optional affected-files list and "Fix it" are follow-ups) and #4607. Stacked on #4602: merge that first, or review only the last commit.
A hand edit or a LuCI change StartWRT cannot represent used to show up in one of three ways: a red toast every five seconds, wrong values, or an overwrite on save. Two boot repairs also acted on settings they could not read. Now each affected page lists those changes, with their file and line and a link to LuCI, in place of its settings. A change StartWRT reads but does not manage is noted above the settings instead.
What it does
config.check(ctrl/src/config_check.rs) readsddns,dhcp,firewall,network,startwrtandwireless. It reports each finding with its file, one-based line, section, option and value, and the pages it affects:server/disabled;ignore;lan;psk2/none;br-lan,lan,wan, thewanzone, or a profile's interface.list ipaddrorlist ip6addr. The page reads the first, a save leaves the rest in place, and the page says so above its settings. Secondary IPv4 addresses on an interface are invisible to StartWRT — profile allocation can reuse their subnet (ctrl/src/profiles.rs guard_subnet_collision) #4607 covers managing them.CustomConfigin place of a page with blocking findings; it has "Launch LuCI Interface" and "Check again".ConfigNoticesrenders notices above a page.FormServicesends a load error caused by configuration StartWRT cannot read or model (codes 1003–1006, 1009–1012, 1022) to the same page instead of toasting it on every poll. The page clears on navigation and reports again if it still fails.Vecfield reads anoptionline as its whitespace-separated words, as OpenWrt's own scripts do.option proto 'udp'on a LuCI rule used to read as an empty list, which the reserved-port and inbound checks treat as every protocol.#[uci(accept_list)]reads the first item of alist, and a write replaces that item and keeps the rest. It coversDhcpHost.mac,NetworkInterface.ipaddrandip6addr.ipaddris anIpv4Addressthat keeps a prefix length.ipv4()andipv4_netmask()give callers the address and the mask the prefix implies, which wins overnetmaskas it does in netifd.MissingOptionandExpectedSectionTypepoint at the section header.ConfigByteskeeps the line when it adds the file name.parse_eachparses files independently.heal_ipv6_statenow acts only on adhcp.lanin the off state StartWRT writes.bootstrap_admin_profileno longer appends a second Admin profile (and a secondpreferencessection) when the existing one fails its typed read.Not included: #4601 (profile save deleting LuCI rules, on its own branch), the affected-files list, "Fix it", and managing secondary addresses (#4607).
Verification
make start-wrt-test: all pass, 820startwrt-coreand 36uciedit. New tests cover: a stock firstboot config yields no findings; one test per finding kind, including the DHCPignore, the disabled or moved Wi-Fi interface, and the two-address notice in both its list-only and option-plus-list forms; aVecfield reading an option as words, with the write replacing the option line; an option replacing earlier list items;accept_liston an optional field keeping later items and dropping only the first;Ipv4Addressbare and prefixed forms; located typed-read errors; the IPv6 repair leaving a relaying or unreadabledhcp.lanalone; bootstrap keeping an unreadable Admin profile.npm run check:wrt,npm run check:i18n:wrt,make start-wrt-rpc-bindings-checkandmake format-checkpass. The production web build runs as part of deploying.bench.sh deployedon the final commit):config.checkon the bench's own customised config, with 5 profiles, VPN interfaces, custom firewall rules and published ports: 0 findings.lan.ipv4-get,wan.ipv4-get,profiles.listanddevices.listread as before.uciand never reloaded unless stated:netmask:lan.ipv4-getreturns the address and the mask the prefix implies, the Admin profile's devices keep their subnet, 0 findings, and the LAN page renders.list ipaddrentries onlan: oneunmanagednotice at the second entry's line for the LAN and Profiles pages. In headless Chromium,/lanand/profilesshow their forms with a warning banner naming the address, file, line and section;/wanshows nothing. Alan.ipv4-setof the same address writesoption ipaddrandoption netmaskand keeps the second entry as alistline; the notice stays after the save.option proto 'udp'accepting port 5555 from the WAN:published-ports.setadding TCP 5555 applies with no collision; adding UDP 5555 reports the collision. The port and the rule were removed afterwards.dhcp.lan.ignore=1, a disabledwifi-ifaceand awifi-ifaceonguest: threeunsupportedfindings with their lines./lanand/wifishow the Custom configuration page listing them;/settingsand/wanrender normally./lanblocked, reverting the config and pressing the button restores the form without navigating.preferencessection and 0 findings.os-bench(unreachable), and translations reviewed by native speakers.