nl80211: Add TEST_FAIL() to nl80211_set_mac_addr()
This makes it easier to test some error paths in wpa_supplicant. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
88802405f3
commit
9ce3e61091
1 changed files with 3 additions and 0 deletions
|
@ -8304,6 +8304,9 @@ static int nl80211_set_mac_addr(void *priv, const u8 *addr)
|
||||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||||
int new_addr = addr != NULL;
|
int new_addr = addr != NULL;
|
||||||
|
|
||||||
|
if (TEST_FAIL())
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (!addr)
|
if (!addr)
|
||||||
addr = drv->perm_addr;
|
addr = drv->perm_addr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue