mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 15:38:37 +04:00
setup() ran wdev.uc set_config once per interface, each time with a configuration of that interface alone. set_config replaces the whole configuration of the radio, so each call stopped the interfaces of the calls before it: with two monitors, or a monitor and an adhoc interface, on one radio, only the last one stayed up. The configuration also passed through the shell inside single quotes, so a single quote in an SSID or a mesh_id broke the command, and two of them made the text between them run as shell code. Pass all interfaces in one call, also when the radio has none, so that removed interfaces stop. Pass the arguments as an array, which system() runs without a shell. Signed-off-by: Felix Fietkau <nbd@nbd.name>