[PATCH 3/4] SIM/USIM: Add function to get the MNC length from the SIM/USIM

Marcel Holtmann marcel
Sun Jan 22 09:48:16 PST 2012


Hi Jouni,

> > The EF-AD (administrative data) file may contain information about the
> > length of the MNC (2 or 3 digits) in the IMSI. This can be used to
> > construct the realm according to 3GPP TS 23.003 during EAP-SIM or
> > EAP-AKA authentication.
> 
> Thanks, applied. Though, I added a new return value for indicating that
> the optional MNC length field was not present in EF_AD to make the debug
> output somewhat cleaner.
> 
> The first SIM card I tested (prepaid Elisa/Kolumbus) this with happened
> to not include the MNC length and the default assumption of 3-digit MNC
> in the patch 4/4 was not the correct one for that card.. Unfortunately,
> it looks like there would need to be a list of MCC/MNC values with the
> MNC length for the automatic detection to work reliably (what a silly
> design to make that field optional and not allow automatic way of
> figuring out the correct field length).

this is not going to work. You can have operators that can mix and match
2 and 3 digit MNC as they please (within the same network). The field is
most likely present, but the SIM filesystem access might be broken. The
firmware for non-phone modems is really crappy in this area. Especially
the Qualcomm based ones are broken all over the places.

Regards

Marcel





More information about the Hostap mailing list