SMS sm_rp_mr set only when conn already established

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/.

Vadim Yanitskiy axilirator at gmail.com
Thu Jan 17 16:14:04 UTC 2019


Hi Neels,

> Does anyone know this code well? I'm almost certain we should
> always set an RP reference? (i.e. drop the 'if (conn)' condition)

I am the author of this code. Thanks a lot for looking into this!
Actually, it was assumed that if there is no active RAN connection,
we can just start counting from 0x00, as there are no other SMS
related transactions, and transaction itself is allocated using
talloc_zero(). Until now it was looking good, but...

I just realized that as soon as we establish RAN connection with
subscriber, we already have a transaction with sm_rp_mr == 0x00,
but conn->next_rp_ref also remains == 0x00, it isn't increased!

This means that we can face a SM-RP-MR conflict (or collision)
if another MT SMS would arrive to the MSC (from SMSC over GSUP)
when this transaction is still active, i.e. the first SMS is
still being sent, because conn->next_rp_ref++ would
return 0x00 too :/

I will write a TTCN test case, and fix this issue. Thanks!

> Could that be a reason Rhizomatica sometimes saw SMS
> delivered to the wrong recipient?

I don't think they are using "SMS over GSUP", so most likely no.
The 'trans->sms.sm_rp_mr' is only used by "SMS over GSUP" code.

With best regards,
Vadim Yanitskiy.



More information about the OpenBSC mailing list