aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_atheros.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-01-09 17:44:28 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-09 17:44:28 (GMT)
commit0382097ef3530497950c53cb5bb1866cbbe82b7b (patch)
tree218c230ed7f895e265c6e4345647b8302495439b /src/drivers/driver_atheros.c
parent8546ea19301f31e5faf58a0f154773c3123e6474 (diff)
downloadhostap-0382097ef3530497950c53cb5bb1866cbbe82b7b.zip
hostap-0382097ef3530497950c53cb5bb1866cbbe82b7b.tar.gz
hostap-0382097ef3530497950c53cb5bb1866cbbe82b7b.tar.bz2
Use set_key addr to distinguish default and multicast keys
Previously, both NULL and ff:ff:ff:ff:ff:ff addr were used in various places to indicate default/broadcast keys. Make this more consistent and useful by defining NULL to mean default key (i.e., used both for unicast and broadcast) and ff:ff:ff:ff:ff:ff to indicate broadcast key (i.e., used only with broadcast).
Diffstat (limited to 'src/drivers/driver_atheros.c')
-rw-r--r--src/drivers/driver_atheros.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 35e642c..869e49c 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -478,7 +478,7 @@ atheros_set_key(const char *ifname, void *priv, enum wpa_alg alg,
memset(&wk, 0, sizeof(wk));
wk.ik_type = cipher;
wk.ik_flags = IEEE80211_KEY_RECV | IEEE80211_KEY_XMIT;
- if (addr == NULL) {
+ if (addr == NULL || is_broadcast_ether_addr(addr)) {
memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
wk.ik_keyix = key_idx;
wk.ik_flags |= IEEE80211_KEY_DEFAULT;