aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.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_wext.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_wext.c')
-rw-r--r--src/drivers/driver_wext.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index ecb03ae..e731101 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1622,8 +1622,7 @@ static int wpa_driver_wext_set_key_ext(void *priv, enum wpa_alg alg,
iwr.u.encoding.pointer = (caddr_t) ext;
iwr.u.encoding.length = sizeof(*ext) + key_len;
- if (addr == NULL ||
- os_memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN) == 0)
+ if (addr == NULL || is_broadcast_ether_addr(addr))
ext->ext_flags |= IW_ENCODE_EXT_GROUP_KEY;
if (set_tx)
ext->ext_flags |= IW_ENCODE_EXT_SET_TX_KEY;