[RFC][PATCH 4/5] wpa_supplicant config: Add realm_3gpp parameter

Simon Baatz gmbnomis at gmail.com
Mon Jan 2 18:29:13 EST 2012


realm_3gpp=1 can be used to enable realm appending according to 3GPP
TS 23.003 (use "@wlan.mncXXX.mccXXX.3gppnetwork.org" realm).  This
field is used for EAP-SIM and EAP-AKA and is only used if the PC/SC
smartcard interface is enabled and no identity has been configured.
---
 src/eap_peer/eap_config.h          |   14 ++++++++++++++
 wpa_supplicant/config.c            |    2 ++
 wpa_supplicant/wpa_supplicant.conf |    5 +++++
 3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/eap_peer/eap_config.h b/src/eap_peer/eap_config.h
index b64b68f..09ddda3 100644
--- a/src/eap_peer/eap_config.h
+++ b/src/eap_peer/eap_config.h
@@ -391,6 +391,20 @@ struct eap_peer_config {
 	char *pcsc;
 
 	/**
+	 * realm_3gpp - Enable realm appending according to 3GPP TS 23.003
+	 *
+	 * This field enables the use of the
+	 * "@wlan.mncXXX.mccXXX.3gppnetwork.org" realm defined in 3GPP
+	 * TS 23.003 when obtaining the identity from the USIM or GSM SIM.
+	 *
+	 * This field is only used if the PC/SC smartcard interface is
+	 * enabled and no identity has been configured.
+	 *
+	 * This field is used for EAP-SIM and EAP-AKA.
+	 */
+	int *realm_3gpp;
+
+	/**
 	 * pin - PIN for USIM, GSM SIM, and smartcards
 	 *
 	 * This field is used to configure PIN for SIM and smartcards for
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 0fd1f3e..79ca9df 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1487,6 +1487,7 @@ static char * wpa_config_write_p2p_client_list(const struct parse_data *data,
 
 /* INT_RANGE: Define an integer variable with allowed value range */
 #define INT_RANGE(f, min, max) _INT(f), (void *) (min), (void *) (max), 0
+#define INT_RANGEe(f, min, max) _INTe(f), (void *) (min), (void *) (max), 0
 
 /* FUNC: Define a configuration variable that uses a custom function for
  * parsing and writing the value. */
@@ -1558,6 +1559,7 @@ static const struct parse_data ssid_fields[] = {
 	{ STRe(phase1) },
 	{ STRe(phase2) },
 	{ STRe(pcsc) },
+	{ INT_RANGEe(realm_3gpp, 0, 1) },
 	{ STR_KEYe(pin) },
 	{ STRe(engine_id) },
 	{ STRe(key_id) },
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index d393015..faf4d75 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -528,6 +528,10 @@ fast_reauth=1
 #	challenges (by default, it accepts 2 or 3)
 #	result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use
 #	protected result indication.
+#	realm_3gpp=1 can be used to enable realm appending according to 3GPP
+#	TS 23.003 (use "@wlan.mncXXX.mccXXX.3gppnetwork.org" realm).  This
+#	field is used for EAP-SIM and EAP-AKA and is only used if the PC/SC
+#	smartcard interface is enabled and no identity has been configured.
 #	'crypto_binding' option can be used to control PEAPv0 cryptobinding
 #	behavior:
 #	 * 0 = do not use cryptobinding (default)
@@ -727,6 +731,7 @@ network={
 	ssid="eap-sim-test"
 	key_mgmt=WPA-EAP
 	eap=SIM
+	realm_3gpp=1
 	pin="1234"
 	pcsc=""
 }
-- 
1.7.5.4



More information about the HostAP mailing list