<p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/20532">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/20532/10/ggsn/ggsn_vty.c">File ggsn/ggsn_vty.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/20532/10/ggsn/ggsn_vty.c@897">Patch Set #10, Line 897:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (strlen(argv[1]) != 15) {<br>              vty_out(vty, "%% Invalid IMSI '%s'%s", argv[1], VTY_NEWLINE);<br>               return CMD_WARNING;<br>   }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think there is a strict requirement that IMSIs must always be 15 digits long.  3GPP TS 23.002 states the imsi has "not more than 15 digits" and that the first 5..6 digits are for MCC/MNC matching.  But the remainder (NMSI) can be as short as one wants.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I think if you wnat to check on the length, it should be a check of "at least 6 digits (3-digit MCC + 2-digit MNC + 1 digit NMSI)" and "not more than 15 digits"</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/20532">change 20532</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ggsn/+/20532"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icd2e2bc6068c06fbf5d5fe905ebcda8954f33f04 </div>
<div style="display:none"> Gerrit-Change-Number: 20532 </div>
<div style="display:none"> Gerrit-PatchSet: 10 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 12 Oct 2020 10:59:16 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>