fix(wireless): raise when a uci step of an ACL or channel push is refused
driver / standard (pull_request) Successful in 24s
driver / lint (pull_request) Successful in 24s
driver / types (pull_request) Successful in 1m28s
driver / test (3.13) (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m21s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m38s
driver / publish (pull_request) Skipped

push_mac_acl and push_radio_channel sent each step through the
interactive shell and never looked at the result: a refused uci set,
add_list, commit or wifi reload passed silently, an SSID no wifi-iface
carried did nothing, and wifi was restarted after a refused channel.

Each step now runs on an SSH exec channel of its own, as root, with its
exit status checked (uci_steps.UciStepsMixin). A refused step raises
CommandErrorException naming the command and what the router said; a
refusal before the commit reverts what was staged, so a later commit
does not apply half of it, and wifi is not restarted. push_mac_acl
reads the sections once, raises when none carries the SSID, and deletes
macfilter/maclist only where a section has them instead of hiding each
delete's status behind `|| true`.

Closes #35
This commit is contained in:
Christian Manivong committed 2026-11-12 19:01:07 +01:00
1 parent 522720f818
commit 0552663d53
6 files changed
+516 -164

No files matched your search

+9
View File
@@ -70,6 +70,15 @@ recorded here; their history is the git log.
`manage_service("lldpd", "enable")` and `manage_service("lldpd", "start")` (#8).
### Fixed
- `push_mac_acl()` and `push_radio_channel()` raise when the router refuses a step
(`CommandErrorException`, naming the `uci` command or the wifi restart and what the
router said). They used to return normally after a refused `uci set`, `add_list`,
`commit` or `wifi reload`, so an ACL that never landed looked applied. Each step runs
on an SSH exec channel of its own and as root, with its exit status checked; a
refused change reverts what was staged, so nothing of it is committed by a later
write, and wifi is not restarted for it. `push_mac_acl()` raises when no wifi-iface
carries the SSID, where it did nothing, and deletes `macfilter`/`maclist` only where
a section has them instead of hiding every delete's status behind `|| true` (#35).
- `get_ntp_servers()` names every server of the `system.ntp.server` list; it kept only
the first, as uci prints a list as `'a' 'b' 'c'` on one line.
- `get_lldp_neighbors()` and `get_lldp_neighbors_detail()` keep an interface name with