Skip to content

net: generate OpenWrt config and calibrate WAN weights#264

Open
lePereT wants to merge 4 commits into
migration-basefrom
uci-changes
Open

net: generate OpenWrt config and calibrate WAN weights#264
lePereT wants to merge 4 commits into
migration-basefrom
uci-changes

Conversation

@lePereT
Copy link
Copy Markdown
Contributor

@lePereT lePereT commented May 22, 2026

What type of PR is this? (check all applicable)

  • Feature
  • Bug Fix
  • Documentation Update
  • Code Refactor
  • Test

Description

Implements the next NET/OpenWrt integration pass: complete UCI ownership, bounded OpenWrt name generation, canonical GSM uplink state for NET, and event-led WAN speed testing.

Changes include:

  • Adds a central OpenWrt name allocator so generated interface, device, firewall, dnsmasq and mwan3 names cannot exceed platform limits.
  • Changes OpenWrt UCI apply to complete package rewrites for Devicecode-owned packages, including creation of missing /etc/config/* files before apply.
  • Generates unconditional network baseline sections, including loopback and globals.
  • Defaults LAN/system/user/guest segment realisation to bridge-backed VLAN devices, while keeping WAN/uplink segments direct by default.
  • Groups dnsmasq instances by effective DNS policy and binds DHCP pools to their selected dnsmasq instance.
  • Removes generated devicecode_* UCI watermark options; provider apply/plan now return openwrt_names mappings instead.
  • Adds canonical GSM uplink state under state/gsm/uplink/<role>, while retaining the legacy state/gsm/modem/<role>/uplink topic for compatibility.
  • Updates Big Box config to use gsm-uplink source identity for modem WAN members.
  • Updates NET WAN runtime so speedtests are driven by observed mwan3 readiness rather than being started as a batch after apply.
  • Applies live mwan3 weights from measured uplinks, with probe weights for unmeasured members.
  • Adds semantic translation between NET member names and generated OpenWrt/mwan3 names.
  • Updates NET and naming documentation for the new GSM uplink contract and OpenWrt provider behaviour.

Manual test

  • yes

Manual test description

Confirmed the full test suite passes:

894 tests, 0 failed, 0 skipped

Also confirmed all OpenWrt VM tests pass.

Added tests?

  • yes

Added to documentation?

  • docs/naming.md
  • docs/specs/net.md

@lePereT lePereT changed the title Uci changes net: generate OpenWrt config and calibrate WAN weights May 22, 2026
@lePereT lePereT requested a review from rslater-cs May 22, 2026 04:55
@lePereT lePereT marked this pull request as ready for review May 22, 2026 04:58
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.

1 participant