<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">Hi, I am sorry for my previous bad post format. There are the right diff files.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">A</span>nd the problem was as I said in Imsi attach procedure new TLLI == new allocated P-tmsi, and there was a problem that the function <span style="font-size:13px;font-family:arial,sans-serif"> gprs_tmsi2tlli() function there was not called and so I had to mask the upper bits in function where the p-tmsi is allocated, there is also a pcap trace where you can see it.</span></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">thanks, regards</font></div><div><font face="arial, sans-serif">Michal</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-05-17 13:50 GMT+02:00 Harald Welte <span dir="ltr"><<a href="mailto:laforge@gnumonks.org" target="_blank">laforge@gnumonks.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Michal,<br>
<br>
thanks a lot for reporting back on your experience.<br>
<br>
Hoewever, it is customary to post changes as unified diff ('diff -u'<br>
format here on this list for review.  I have a hard time understanding<br>
the format that you posted.  Can you pleaes re-post your changes?<br>
Either with diff -u created manually, or with 'git diff' or similar.<br>
<div class=""><br>
On Mon, May 05, 2014 at 11:13:37PM +0200, Michal Grznár wrote:<br>
> Hi, I am using OsmoSGSN in topology with OpenGGSN and proprietary simulator<br>
</div><div class="">> and the problem is that in IP-subnetwork, which I am using there is no<br>
> use for RESET or UNBLOCK procedure, so I had to do a PATCH in<br>
> gprs_ns.c, which was needed to complete succesful connection between<br>
> sim-bss and OsmoSGSN:<br>
<br>
</div>If you would like to see such code merged, please extend osmo-sgsn so<br>
that the type of BSS can be configured via vty,  and make the code<br>
conditional.  At that point you could simply have a different config<br>
file for your sim-bss than we have.<br>
<div class=""><br>
> another PATCH I needed to do was to change a little bit procedure for<br>
> allocation of P-TMSI in procedure uint32_t sgsn_alloc_ptmsi(void) in<br>
> gprs_sgsn.c<br>
><br>
> uint32_t sgsn_alloc_ptmsi(void)<br>
> {<br>
>       struct sgsn_mm_ctx *mm;<br>
>       uint32_t ptmsi;<br>
><br>
> restart:<br>
> +++    ptmsi = rand() | 0xc0000000;              /*because of GPRS IMSI<br>
> ATTACH*/<br>
>           llist_for_each_entry(mm, &sgsn_mm_ctxts, list) {<br>
>                  if (mm->p_tmsi == ptmsi)<br>
>                           goto restart;<br>
>           }<br>
>           return ptmsi;<br>
> }<br>
><br>
> because in GPRS IMSI ATTACH in message ATTACH COMPLETE (3GPP 24.008,<br>
> 23.003, 48.018) there is new TLLI==new allocated P-TMSI and I need local<br>
> TLLI, so I had to do it this way<br>
<br>
</div>This is most certainly not the right way to fix the problem.  The TLLI<br>
is generated at a different layer than the P-TMSI.  The P-TMSI should be<br>
completely random, and the TLLI derived from that should mask the upper<br>
bits, using the gprs_tmsi2tlli() function.<br>
<br>
Can you please explain more what the actual problem was and how it<br>
manifested iself?  If possible, include pcap traces for further<br>
illustration.<br>
<br>
Thanks,<br>
        Harald<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
- Harald Welte <<a href="mailto:laforge@gnumonks.org">laforge@gnumonks.org</a>>           <a href="http://laforge.gnumonks.org/" target="_blank">http://laforge.gnumonks.org/</a><br>
============================================================================<br>
"Privacy in residential applications is a desirable marketing option."<br>
                                                  (ETSI EN 300 175-7 Ch. A6)<br>
</font></span></blockquote></div><br></div>