mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Interworking: Add support for using eap_proxy offload
Fetch IMSI through eap_proxy for Interworking network selection if needed. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
4331263b73
commit
ec7b97ab00
@ -1346,6 +1346,13 @@ static struct wpa_cred * interworking_credentials_available_3gpp(
|
|||||||
goto compare;
|
goto compare;
|
||||||
}
|
}
|
||||||
#endif /* PCSC_FUNCS */
|
#endif /* PCSC_FUNCS */
|
||||||
|
#ifdef CONFIG_EAP_PROXY
|
||||||
|
if (cred->pcsc && wpa_s->mnc_len > 0 && wpa_s->imsi[0]) {
|
||||||
|
imsi = wpa_s->imsi;
|
||||||
|
mnc_len = wpa_s->mnc_len;
|
||||||
|
goto compare;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_EAP_PROXY */
|
||||||
|
|
||||||
if (cred->imsi == NULL || !cred->imsi[0] ||
|
if (cred->imsi == NULL || !cred->imsi[0] ||
|
||||||
cred->milenage == NULL || !cred->milenage[0])
|
cred->milenage == NULL || !cred->milenage[0])
|
||||||
@ -1358,9 +1365,9 @@ static struct wpa_cred * interworking_credentials_available_3gpp(
|
|||||||
mnc_len = sep - cred->imsi - 3;
|
mnc_len = sep - cred->imsi - 3;
|
||||||
imsi = cred->imsi;
|
imsi = cred->imsi;
|
||||||
|
|
||||||
#ifdef PCSC_FUNCS
|
#if defined(PCSC_FUNCS) || defined(CONFIG_EAP_PROXY)
|
||||||
compare:
|
compare:
|
||||||
#endif /* PCSC_FUNCS */
|
#endif /* PCSC_FUNCS || CONFIG_EAP_PROXY */
|
||||||
wpa_printf(MSG_DEBUG, "Interworking: Parsing 3GPP info from "
|
wpa_printf(MSG_DEBUG, "Interworking: Parsing 3GPP info from "
|
||||||
MACSTR, MAC2STR(bss->bssid));
|
MACSTR, MAC2STR(bss->bssid));
|
||||||
ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len);
|
ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "crypto/sha1.h"
|
#include "crypto/sha1.h"
|
||||||
#include "eapol_supp/eapol_supp_sm.h"
|
#include "eapol_supp/eapol_supp_sm.h"
|
||||||
#include "eap_peer/eap.h"
|
#include "eap_peer/eap.h"
|
||||||
|
#include "eap_peer/eap_proxy.h"
|
||||||
#include "eap_server/eap_methods.h"
|
#include "eap_server/eap_methods.h"
|
||||||
#include "rsn_supp/wpa.h"
|
#include "rsn_supp/wpa.h"
|
||||||
#include "eloop.h"
|
#include "eloop.h"
|
||||||
@ -3010,6 +3011,20 @@ next_driver:
|
|||||||
if (wpa_bss_init(wpa_s) < 0)
|
if (wpa_bss_init(wpa_s) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
#ifdef CONFIG_EAP_PROXY
|
||||||
|
{
|
||||||
|
size_t len;
|
||||||
|
wpa_s->mnc_len = eap_proxy_get_imsi(wpa_s->imsi, &len);
|
||||||
|
if (wpa_s->mnc_len > 0) {
|
||||||
|
wpa_s->imsi[len] = '\0';
|
||||||
|
wpa_printf(MSG_DEBUG, "eap_proxy: IMSI %s (MNC length %d)",
|
||||||
|
wpa_s->imsi, wpa_s->mnc_len);
|
||||||
|
} else {
|
||||||
|
wpa_printf(MSG_DEBUG, "eap_proxy: IMSI not available");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_EAP_PROXY */
|
||||||
|
|
||||||
if (pcsc_reader_init(wpa_s) < 0)
|
if (pcsc_reader_init(wpa_s) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -407,10 +407,8 @@ struct wpa_supplicant {
|
|||||||
* previous association event */
|
* previous association event */
|
||||||
|
|
||||||
struct scard_data *scard;
|
struct scard_data *scard;
|
||||||
#ifdef PCSC_FUNCS
|
|
||||||
char imsi[20];
|
char imsi[20];
|
||||||
int mnc_len;
|
int mnc_len;
|
||||||
#endif /* PCSC_FUNCS */
|
|
||||||
|
|
||||||
unsigned char last_eapol_src[ETH_ALEN];
|
unsigned char last_eapol_src[ETH_ALEN];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user