Skip to content

Commit

Permalink
IMSI length fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
aligungr committed Aug 11, 2021
1 parent f522251 commit e4e4a15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/custom-ue.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 or 16 digits)
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
supi: 'imsi-286010000000001'
# Mobile Country Code value of HPLMN
mcc: '286'
Expand Down
2 changes: 1 addition & 1 deletion config/free5gc-ue.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 or 16 digits)
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
supi: 'imsi-208930000000003'
# Mobile Country Code value of HPLMN
mcc: '208'
Expand Down
2 changes: 1 addition & 1 deletion config/open5gs-ue.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 or 16 digits)
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 digits)
supi: 'imsi-901700000000001'
# Mobile Country Code value of HPLMN
mcc: '901'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/common_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Supi Supi::Parse(const std::string &supi)
if (supi[0] == 'i' && supi[1] == 'm' && supi[2] == 's' && supi[3] == 'i' && supi[4] == '-')
{
std::string val = supi.substr(5);
if (val.size() != 15 && val.size() != 16)
if (val.size() != 15)
throw std::runtime_error("invalid IMSI value");
for (char c : val)
if (c < '0' || c > '9')
Expand Down

0 comments on commit e4e4a15

Please sign in to comment.