aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-01-09 10:09:04 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-09 10:09:04 (GMT)
commitda64c266e73805516afb9e99bf90ea2581a55ad3 (patch)
tree2804496186080a645b71b91a08b688a068cbe551 /src/drivers/driver_bsd.c
parent0a9ddd92cd85f47bba0520c4d87414066b43955c (diff)
downloadhostap-da64c266e73805516afb9e99bf90ea2581a55ad3.zip
hostap-da64c266e73805516afb9e99bf90ea2581a55ad3.tar.gz
hostap-da64c266e73805516afb9e99bf90ea2581a55ad3.tar.bz2
Use more consistent set_key seq value when nothing is being set
Use NULL instead of (u8 *) "" as the seq value and make sure the driver wrapper implementations can handle NULL value. This was previously already done in number of places, but not everywhere.
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 6067dc3..c9520ec 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -347,7 +347,8 @@ bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg,
if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx)
wk.ik_flags |= IEEE80211_KEY_DEFAULT;
wk.ik_keylen = key_len;
- os_memcpy(&wk.ik_keyrsc, seq, seq_len);
+ if (seq)
+ os_memcpy(&wk.ik_keyrsc, seq, seq_len);
os_memcpy(wk.ik_keydata, key, key_len);
return set80211var(priv, IEEE80211_IOC_WPAKEY, &wk, sizeof(wk));