<div dir="ltr">So it is the communication between osmoSGSN and sim-bss (Attach procedure). The problem comes in attach accept/complete. OsmoSGSN sends message attach accept with currenr TLLI = 0x78000001 and with new allocated P-TMSI = 0x475b916b. Sim-bss answeres with message attach complete with new tlli made/generated im osmoSGSN from new P-TMSI...and as I said and as 3GPP 24.008 spec. says new TLLI = new allocated P-TMSI = 0x475b916b. And there comes the problem that it is not LOCAL TLLI. So the point of the problem is that new P-TMSI/TLLI is not generated correctly and could be said osmoSGSN rejects what it generated and that is the problem. If it helps, I connects osmo-SGSN_vty output.<div>
<br></div><div>Regards Michal</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-28 14:38 GMT+02:00 Michal Grznár <span dir="ltr"><<a href="mailto:mihal.grznar@gmail.com" target="_blank">mihal.grznar@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, it wasn´t handly written diffs but here I send diff made by using git diff. And the problem you can see in packets with number 27-40 (especially see in number 30 you see there the old tlli and newly generated P-TMSI in message attach accept and in number 31 there is new TLLI which is the same as generated P-TMSI in previous message) and that is the problem I needed to solve, that the new TLLI was not LOCAL.<div>

<br></div><div>regards Michal</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-23 13:16 GMT+02:00 Holger Hans Peter Freyther <span dir="ltr"><<a href="mailto:holger@freyther.de" target="_blank">holger@freyther.de</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Fri, May 23, 2014 at 11:44:40AM +0200, Michal Grznár wrote:<br>
<br>
Hi,<br>
<br>
</div><div>> And the problem was as I said in Imsi attach procedure new TLLI == new<br>
> allocated P-tmsi, and there was a problem that the function  gprs_tmsi2tlli()<br>
> function there was not called and so I had to mask the upper bits in<br>
> function where the p-tmsi is allocated, there is also a pcap trace where<br>
> you can see it.<br>
<br>
</div>Could you please elaborate of what/were (e.g. packet numbers) we<br>
can see "it" and what it should be instead? And please use "git diff"<br>
or preferable "git commit" and git format-patch. The "diff" you include<br>
is hand-written and sadly not usable because of this.<br>
<br>
And as written by Harald before. The place you patch is not correct.<br>
The method you patch should generate a unique P-TMSI. It might should<br>
mask some of the higher bits. But you need to look at the callers of<br>
this function if the tlli is not updated.<br>
<br>
e.g. in src/gprs/gprs_gmm.c you will see something like this:<br>
<br>
        ctx->p_tmsi = sgsn_alloc_ptmsi();<br>
#endif<br>
<br>
        /* Even if there is no P-TMSI allocated, the MS will switch from<br>
         * foreign TLLI to local TLLI */<br>
        ctx->tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL);<br>
<br>
        /* Inform LLC layer about new TLLI but keep old active */<br>
        gprs_llgmm_assign(ctx->llme, ctx->tlli, ctx->tlli_new,<br>
                          GPRS_ALGO_GEA0, NULL);<br>
<br>
So this call to gprs_tmsi2tlli will make sure that 0xc0000000 will<br>
be set. In fact I see two calls to sgsn_alloc_ptmsi and both of them<br>
do the above and assign the new tlli to the context. So please could<br>
you try to explain what you are trying to solve?<br>
<span><font color="#888888"><br>
holger<br>
<br>
</font></span></blockquote></div></div></div><br></div>
</blockquote></div><br></div>