aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorMichael Braun <michael-dev@fami-braun.de>2011-12-11 11:01:57 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-11 11:01:57 (GMT)
commit05ab9712b9977192b713f01f07c3b14ca4d1ba78 (patch)
tree1e97b6daa1f6f5053e97b58be2955bd65a30c696 /src/ap/wpa_auth_glue.c
parentc3daaf3325563ccbe0d8c3a8c8b729683a9d68c2 (diff)
downloadhostap-05ab9712b9977192b713f01f07c3b14ca4d1ba78.zip
hostap-05ab9712b9977192b713f01f07c3b14ca4d1ba78.tar.gz
hostap-05ab9712b9977192b713f01f07c3b14ca4d1ba78.tar.bz2
Allow WPA passphrase to be fetched with RADIUS Tunnel-Password attribute
This allows per-device PSK to be configured for WPA-Personal using a RADIUS authentication server. This uses RADIUS-based MAC address ACL (macaddr_acl=2), i.e., Access-Request uses the MAC address of the station as the User-Name and User-Password. The WPA passphrase is returned in Tunnel-Password attribute in Access-Accept. This functionality can be enabled with the new hostapd.conf parameter, wpa_psk_radius. Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index 1e9d422..56bab23 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -186,6 +186,9 @@ static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr,
const u8 *prev_psk)
{
struct hostapd_data *hapd = ctx;
+ struct sta_info *sta = ap_get_sta(hapd, addr);
+ if (sta && sta->psk)
+ return sta->psk;
return hostapd_get_psk(hapd->conf, addr, prev_psk);
}