aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-02-26 10:57:07 +0100
committerOliver Smith <osmith@sysmocom.de>2020-02-26 11:47:45 +0100
commit134f41f5d13329ca8c8d6fa59600b36ad7f24980 (patch)
tree811f8c43d69375f06e5660a7faaf59a3414058fb
parent4ac43a2f1be7ed28f68a585ebc0c49c0f6294b6f (diff)
Invalidate TMSI, P-TMSI after changing IMSI
Now the ME doesn't try to send the TMSI anymore in the next Location Updating Request, it directly sends the IMSI.
-rwxr-xr-xsim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java b/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
index d876dca..79e8edb 100755
--- a/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
+++ b/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
@@ -210,6 +210,8 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
mi = MobileIdentity.str2mi(newIMSI_str, MobileIdentity.MI_IMSI, (byte)9);
writeIMSI(mi);
showMsg(changed);
+ invalidateTMSI((short)SIMView.FID_EF_LOCI);
+ invalidateTMSI((short)SIMView.FID_EF_LOCIGPRS);
refreshIMSI();
} catch (Exception e) {
showError((short)42);
@@ -234,6 +236,14 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
gsmFile.updateBinary((short)0, mi, (short)0, (short)mi.length);
}
+ private void invalidateTMSI(short fid)
+ {
+ byte[] TMSI = {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff};
+ gsmFile.select((short) SIMView.FID_DF_GSM);
+ gsmFile.select(fid);
+ gsmFile.updateBinary((short)0, TMSI, (short)0, (short)TMSI.length);
+ }
+
/*
* - command qualifiers for REFRESH,
* ETSI TS 101 267 / 3GPP TS 11.14 chapter 12.6 "Command details":