HS 2.0R2: Add update_identifier field to network

This can be used to configure a Hotspot 2.0 Release 2 network externally
for a case where wpa_supplicant-based Interworking network selection is
not used and the update_identifier cannot be copied directly from a
cred.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt 2014-06-30 09:59:17 -07:00 committed by Jouni Malinen
parent 5bc285716e
commit e376290c66
5 changed files with 20 additions and 1 deletions

View file

@ -1751,6 +1751,9 @@ static const struct parse_data ssid_fields[] = {
#ifdef CONFIG_MACSEC #ifdef CONFIG_MACSEC
{ INT_RANGE(macsec_policy, 0, 1) }, { INT_RANGE(macsec_policy, 0, 1) },
#endif /* CONFIG_MACSEC */ #endif /* CONFIG_MACSEC */
#ifdef CONFIG_HS20
{ INT(update_identifier) },
#endif /* CONFIG_HS20 */
}; };
#undef OFFSET #undef OFFSET

View file

@ -739,6 +739,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
#ifdef CONFIG_MACSEC #ifdef CONFIG_MACSEC
INT(macsec_policy); INT(macsec_policy);
#endif /* CONFIG_MACSEC */ #endif /* CONFIG_MACSEC */
#ifdef CONFIG_HS20
INT(update_identifier);
#endif /* CONFIG_HS20 */
#undef STR #undef STR
#undef INT #undef INT

View file

@ -647,6 +647,10 @@ struct wpa_ssid {
*/ */
int macsec_policy; int macsec_policy;
#endif /* CONFIG_MACSEC */ #endif /* CONFIG_MACSEC */
#ifdef CONFIG_HS20
int update_identifier;
#endif /* CONFIG_HS20 */
}; };
#endif /* CONFIG_SSID_H */ #endif /* CONFIG_SSID_H */

View file

@ -930,6 +930,9 @@ static int wpa_config_write_network(HKEY hk, struct wpa_ssid *ssid, int id)
MGMT_FRAME_PROTECTION_DEFAULT); MGMT_FRAME_PROTECTION_DEFAULT);
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
STR(id_str); STR(id_str);
#ifdef CONFIG_HS20
INT(update_identifier);
#endif /* CONFIG_HS20 */
#undef STR #undef STR
#undef INT #undef INT

View file

@ -109,7 +109,13 @@ int hs20_get_pps_mo_id(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
{ {
struct wpa_cred *cred; struct wpa_cred *cred;
if (ssid == NULL || ssid->parent_cred == NULL) if (ssid == NULL)
return 0;
if (ssid->update_identifier)
return ssid->update_identifier;
if (ssid->parent_cred == NULL)
return 0; return 0;
for (cred = wpa_s->conf->cred; cred; cred = cred->next) { for (cred = wpa_s->conf->cred; cred; cred = cred->next) {