mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 06:38:29 +04:00
Bringing a netdev up can fail, for example with ENOTUNIQ from ieee80211_do_open() when another running interface of the wiphy has the same address. wdev_set_up() ignored the result, and wpa_supplicant's iface_start() and mld_add(), hostapd's bss_check_mld() and wdev.uc went on as if the netdev ran. wpa_supplicant and wdev.uc also went on after a failed netdev creation. Return the error from wdev_set_up(). On a failure to create the netdev or to bring it up, stop there; after a failure to bring it up, also remove the netdev. wpa_supplicant leaves the interface not running for the next start_pending() or mld_start(), hostapd skips the links of the AP MLD, and wdev.uc drops it from its state for the next setup. Signed-off-by: Felix Fietkau <nbd@nbd.name>