[PATCH] move to hex TMSI representation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Thu Mar 17 13:29:33 UTC 2016


> On 17 Mar 2016, at 14:17, Harald Welte <laforge at gnumonks.org> wrote:
> 
> Hi Vadim,

Hi Guys,


> I've merged both of your patches, thanks!

I think it was a bit too quick. I foresee one problem. Let's assume someone is using TMSIs and now upgrade the sourcecode. All CM Service Requests will fail because the TMSI is not known. What is the migration/mitigation plan?


-#define tmsi_from_string(str) strtoul(str, NULL, 10)
+#define tmsi_from_string(str) strtoul(str + 2, NULL, 16)

is problematic too:

1.) E.g.

        gsm48_mi_to_string(mi_string, sizeof(mi_string), idi->mi, idi->mi_len);
...
                subscr = subscr_get_by_tmsi(bts->network->subscr_group,
                                            tmsi_from_string(mi_string));

tmsi_from_string will not work for this anymore.

2.) there is no length check but that doesn't seem to be a big issue right now.


* I think the above hunk should be reverted
* a DB schema upgrade and store the TMSI as uint32_t
* Use hex presentation in VTY


What do you think? 




More information about the OpenBSC mailing list