push_mac_acl and push_radio_channel (napalm_openwrt/wireless_mixin.py, at e2eda54) send each step through _send_command and never look at the result:
a refused uci set …macfilter, uci add_list …maclist, uci commit wireless or wifi reload passes silently;
push_mac_acl with an SSID name that matches no wifi-iface section does nothing and returns normally;
push_radio_channel restarts wifi even if the uci set was refused.
STANDARDS §3/§4: a write is an action, and "a refused or failed step" must raise. The caller cannot tell an applied ACL from one that never landed: NetOrk/netork#2145 makes NetOrk push SSID MAC ACLs again (the tasks had been unregistered), so this now decides whether a blacklist the user set is really enforced.
Fix (test first, with recorded output): run each uci step so that its exit status is checked (e.g. append ; echo __rc=$? or use the driver's run_command with a status), raise on a non-zero status naming the step, and raise when no wifi-iface carries the SSID. Same for push_radio_channel.
Related: NetOrk/netork#695 / #408 move more UCI writes into this driver later (with NetOrk/netork#1105); they will use the same checked step runner.
prio/P2: an ACL change can fail silently on the device while NetOrk shows it as applied.
`push_mac_acl` and `push_radio_channel` (`napalm_openwrt/wireless_mixin.py`, at e2eda54) send each step through `_send_command` and never look at the result:
- a refused `uci set …macfilter`, `uci add_list …maclist`, `uci commit wireless` or `wifi reload` passes silently;
- `push_mac_acl` with an SSID name that matches no `wifi-iface` section does nothing and returns normally;
- `push_radio_channel` restarts wifi even if the `uci set` was refused.
STANDARDS §3/§4: a write is an action, and "a refused or failed step" must raise. The caller cannot tell an applied ACL from one that never landed: NetOrk/netork#2145 makes NetOrk push SSID MAC ACLs again (the tasks had been unregistered), so this now decides whether a blacklist the user set is really enforced.
**Fix (test first, with recorded output):** run each `uci` step so that its exit status is checked (e.g. append `; echo __rc=$?` or use the driver's `run_command` with a status), raise on a non-zero status naming the step, and raise when no `wifi-iface` carries the SSID. Same for `push_radio_channel`.
Related: NetOrk/netork#695 / #408 move more UCI writes into this driver later (with NetOrk/netork#1105); they will use the same checked step runner.
prio/P2: an ACL change can fail silently on the device while NetOrk shows it as applied.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
push_mac_aclandpush_radio_channel(napalm_openwrt/wireless_mixin.py, ate2eda54) send each step through_send_commandand never look at the result:uci set …macfilter,uci add_list …maclist,uci commit wirelessorwifi reloadpasses silently;push_mac_aclwith an SSID name that matches nowifi-ifacesection does nothing and returns normally;push_radio_channelrestarts wifi even if theuci setwas refused.STANDARDS §3/§4: a write is an action, and "a refused or failed step" must raise. The caller cannot tell an applied ACL from one that never landed: NetOrk/netork#2145 makes NetOrk push SSID MAC ACLs again (the tasks had been unregistered), so this now decides whether a blacklist the user set is really enforced.
Fix (test first, with recorded output): run each
ucistep so that its exit status is checked (e.g. append; echo __rc=$?or use the driver'srun_commandwith a status), raise on a non-zero status naming the step, and raise when nowifi-ifacecarries the SSID. Same forpush_radio_channel.Related: NetOrk/netork#695 / #408 move more UCI writes into this driver later (with NetOrk/netork#1105); they will use the same checked step runner.
prio/P2: an ACL change can fail silently on the device while NetOrk shows it as applied.