projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8880240
)
nl80211: Add TEST_FAIL() to nl80211_set_mac_addr()
author
Jouni Malinen
<j@w1.fi>
Sun, 22 May 2016 15:08:55 +0000
(18:08 +0300)
committer
Jouni Malinen
<j@w1.fi>
Sun, 22 May 2016 15:08:55 +0000
(18:08 +0300)
This makes it easier to test some error paths in wpa_supplicant.
Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c
patch
|
blob
|
history
diff --git
a/src/drivers/driver_nl80211.c
b/src/drivers/driver_nl80211.c
index
b4135cc
..
12a417b
100644
(file)
--- a/
src/drivers/driver_nl80211.c
+++ b/
src/drivers/driver_nl80211.c
@@
-8304,6
+8304,9
@@
static int nl80211_set_mac_addr(void *priv, const u8 *addr)
struct wpa_driver_nl80211_data *drv = bss->drv;
int new_addr = addr != NULL;
+ if (TEST_FAIL())
+ return -1;
+
if (!addr)
addr = drv->perm_addr;