aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-09-01 08:30:26 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-01 08:30:26 (GMT)
commit759fd76b7fa554f3ee09a5a63d8cba76934b27d1 (patch)
treed41e395cb088461314c1427eb17bac73a51d8748 /src/ap/wpa_auth_glue.c
parent94ddef3e72ac92860d94039421b7ee2cfd81c198 (diff)
downloadhostap-759fd76b7fa554f3ee09a5a63d8cba76934b27d1.zip
hostap-759fd76b7fa554f3ee09a5a63d8cba76934b27d1.tar.gz
hostap-759fd76b7fa554f3ee09a5a63d8cba76934b27d1.tar.bz2
P2P: Select PSK based on Device Address instead of Interface Address
When using per-device PSKs, select the PSK based on the P2P Device Address of the connecting client if that client is a P2P Device. This allows the P2P Interface Address to be changed between P2P group connections which may happen especially when using persistent groups. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index ea5e74f..d977b42 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -186,6 +186,7 @@ static int hostapd_wpa_auth_get_eapol(void *ctx, const u8 *addr,
static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr,
+ const u8 *p2p_dev_addr,
const u8 *prev_psk)
{
struct hostapd_data *hapd = ctx;
@@ -200,7 +201,7 @@ static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr,
}
#endif /* CONFIG_SAE */
- psk = hostapd_get_psk(hapd->conf, addr, prev_psk);
+ psk = hostapd_get_psk(hapd->conf, addr, p2p_dev_addr, prev_psk);
/*
* This is about to iterate over all psks, prev_psk gives the last
* returned psk which should not be returned again.