Repository navigation
SIP ALG: on/off switch on the Administration page, on FLWRT 2.0's Device.Firewall.ConnectionTracking.SIP.Enable (ref FWDEV#217) #1694
Copy link
Copy link
Open
Labels
2.xLabeled for 2.x versionLabeled for 2.x versionFLWRT-2.0Labeled belonging on FLWRT-2.0Labeled belonging on FLWRT-2.0enhancementNew feature or requestNew feature or requestfeature:advancedAdvanced network configurationAdvanced network configurationtriagedAutomated diagnosis complete; root cause investigated (bug lane entry)Automated diagnosis complete; root cause investigated (bug lane entry)
Description
Summary
Add a SIP ALG on/off switch to the 2.x Administration page. FLWRT 2.0 serves it on the standard leaf Device.Firewall.ConnectionTracking.SIP.Enable (linksys/FWDEV#217; firmware merged in linksys/feed_usp#41 and linksys/targets#251 on 2026-10-09). It is 1.x's one ALG switch (JNAP isSIPEnabled).
This is the ALG part of #875. Device.NAT.ALG.*, which #875 names, is not the path (FW's comment on #875, 2026-10-15).
Parity row: linksys/Architecture#210, Advanced Settings — Administration.
FW contract
From linksys/FWDEV#217, confirmed on the bench below.
| Path | Type | Access | Default | Meaning |
|---|---|---|---|---|
Device.Firewall.ConnectionTracking.SIP.Enable |
bool | read/write | 0 |
the switch; off, as on 1.0 |
- The setter adds or removes
sipin the conntrack helper list of thelanandguestzones. - It is the only leaf under
Device.Firewall.ConnectionTracking.on this firmware. The other TR-181 helpers (FTP, H323, ...) are not served.
Measured on the bench (2026-10-15)
M60, FW 2.0.3.26101472, through obuspa, ubus call bbfdm schema, and the app's own WASM USP client through the bridge (the path the UI uses).
- Read:
Enable => 0. Writable,xsd:boolean. Device.NAT.ALG.→Path is invalid.Enable=1: read back1; both zones' helper lists gainedsipand the nft ruleset carries the sip helper.Enable=0: read back0;sipleft both lists and the ruleset. The bench is back at0.- A Set takes 8.4–9.0 s to answer through the WASM client (2 writes), and about 9 s through
obuspa, where a Get takes about 1 s. UPnP's Set answers in 0.3–1.9 s. Save has to stay in its busy state for that long without timing out. - Not measured yet: survival across a reboot, and a SIP call through NAT (the latter is FW's end-to-end check in FWDEV#217).
Scope
- Definitions. linksys/usp_framework#85 adds
firewall/sip_alg.yaml(Enable, writable, required). Vendor it and regenerate. If it is not merged when work starts, generate contract-first from it and keep a post-merge recheck list in this issue. - Service. Add the SIP ALG read and write to
UspAdministrationService, beside UPnP. USP errors map toServiceError. - UI. A SIP ALG card on the Administration page, holding one
AppSwitch. Save-based like the UPnP card (dirty guard + Save); nothing is written when the switch is flipped. - Copy. Reuse the 1.x
administrationApplicationLayerGatewaystring ("Application Layer Gateway (SIP)"), which already exists in all 26 locales onmain.
Implementation notes (checked against dev-2.7.3 @ d21530432, 2026-10-16)
- Generate only
sip_alg.yaml. PrivacyGUI vendors usp-codegen 0.17.0; the 0.18.1 upgrade is [USP] Migrate to usp-codegen 0.18.0: multi-instance tables are lists, no fixed-instance reads #1654 and is still open. Takefirewall/sip_alg.yamlfrom linksys/usp_framework#85 and run the vendored binary on that one file, as feat(advanced, wifi): UPnP switch and client/node steering switches (#1660, #1661) #1674 did for UPnP. Pass--client-class 'UspClient'as well as--client-import; without it the output takesUspServiceand does not compile. Checked on 2026-10-16: it generatesSipAlgwithfetch()andupdate(enable:), and no other generated file changes. - Copy the string from
main.administrationApplicationLayerGatewayis in all 26 locales onmain(1.x) and in none ondev-2.7.3, so copy all 26 entries across. - Write only what changed. Today
UspAdministrationNotifier.performSavealways writes UPnP, because the page had one switch. With two, comparesettings.currentagainstsettings.originaland send only the changed switches. "One Save writes both" (below) means both Sets in one Save, not one combined Set: UPnP and SIP ALG are owned by different USP services. - One lock, one window.
uspMutationLockProvider.withLockhas a 30 s default. UPnP answers in under 2 s and SIP ALG in about 9 s, so one lock around both fits; keep the existingTimeoutException→TimeoutErrorfold. - The re-read after a failure (
_rereadAfterFailure) re-reads the whole page, so it covers the new switch oncefetch()returns it. - Test fixtures.
test/mocks/test_data/scenes/administration_scene_data.dartandtest/mocks/provider_overrides/mock_administration.dartbuildAdministrationSettings; both need the new field. The page's layout-gate cells are thepage.administrationrows intest/fixtures/overflow_baselines/page.tsv. - Same page as Administration: management over Wi-Fi switch, on FLWRT 2.0's RULE_MGMT_WIFI_ACCESS (ref FWDEV#216) #1696 (management over Wi-Fi). Build this one first; Administration: management over Wi-Fi switch, on FLWRT 2.0's RULE_MGMT_WIFI_ACCESS (ref FWDEV#216) #1696 adds a third switch on top of it.
Out of scope
- The other ConnectionTracking helpers (FTP, H323, PPTP, ...): the firmware does not serve them.
- Management access and Express Forwarding: stay in [Advanced] Administration Settings Not Supported — Management, UPnP, ALG, Express Forwarding #875.
- A capability gate. The shipping firmware has the leaf, and we do not design for older firmware in this phase.
Acceptance criteria
- The Administration page shows a SIP ALG switch that reads
Device.Firewall.ConnectionTracking.SIP.Enable; on a factory-default router it reads off. - Turning it on and saving sends one
SetofEnable=1. Reading back gives1, andsipis in thelanandguesthelper lists on the bench. - Turning it off and saving sends
Enable=0, reads back0, and removessipfrom both lists. - The value survives a reboot.
- A failed
Setshows an error and leaves the switch at the device's value. - With both the UPnP and the SIP ALG switch changed, one Save writes both.
- Save shows its busy state for the whole ~9 s Set and does not time out.
- Leaving the page with an unsaved change triggers the dirty guard.
- Unit tests for the service and the notifier; the Administration page's layout-gate cells pass with the new card.
Related
- [Advanced] Administration Settings Not Supported — Management, UPnP, ALG, Express Forwarding #875: parent gap ticket. The ALG section becomes done when this ships.
- UPnP: on/off switch on the Administration page, on FLWRT 2.0's Device.UPnP (ref FWDEV#190) #1660: the UPnP switch on the same page.
- [MASTER] Feature inventory re-baselined on FW 2.0.2 — UI implementation × firmware support #1612: master inventory.
- linksys/FWDEV#217: FW work (linksys/feed_usp#41, linksys/targets#251).
- linksys/usp_framework#85: the definition.
- linksys/Architecture#210: parity matrix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.xLabeled for 2.x versionLabeled for 2.x versionFLWRT-2.0Labeled belonging on FLWRT-2.0Labeled belonging on FLWRT-2.0enhancementNew feature or requestNew feature or requestfeature:advancedAdvanced network configurationAdvanced network configurationtriagedAutomated diagnosis complete; root cause investigated (bug lane entry)Automated diagnosis complete; root cause investigated (bug lane entry)
Activity
AustinChangLinksys commentedon Oct 15, 2026
Automated triage
Classification: enhancement (self-filed tracking item, author=Austin — may already be in progress). Not a bug, so no root-cause confidence applies. Line: 2.x. This one is decidable from the body and code because it reads a USP/TR-181 leaf (
Device.Firewall.ConnectionTracking.SIP.Enable), which exists only on the 2.x line.Codebase findings (PrivacyGUI-2x clone, HEAD):
lib/generated/tr181_paths.g.dart:4686-4687:Device.Firewall.ConnectionTracking.SIP.Enableis registered asparameter/readWrite. This matches the FW contract in the issue body (no extra registry work is needed on the app side for the path itself).lib/l10n/app_en.arb:230:administrationApplicationLayerGateway= "Application Layer Gateway (SIP)" already exists, so the copy reuse in Scope item 4 is feasible.lib/page/advanced_settings/administration/views/administration_settings_view.dart:150), and the JNAP-based provider handles UPnP there. In the 2.x clone at HEAD,grep -i upnp lib/finds only the generated registry andusp_test_console_view.dart:547-548; there is no 2.x Administration page or UPnP service yet. The "beside UPnP" / "same Save as UPnP" parts of the scope and ACs depend on the open UPnP ticket (UPnP: on/off switch on the Administration page, on FLWRT 2.0's Device.UPnP (ref FWDEV#190) #1660) landing first.grep -i "ConnectionTracking.SIP" lib/outsidelib/generated/has 0 hits).Blockers / open questions:
Suggested roles:
2x-dev, 2x-verifyAutomated triage by gate.py. Dispatch requires Austin's authorization.