aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-01-18 16:01:50 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-01 18:55:54 +0000
commitc7de62cc53fa6ad985015403dd9af8f1627136a0 (patch)
tree619e05fb725a4baa614d7566b9abc688a6f0ef46 /include
parentcfd058dbf153ee95a9338fe1966eead3a6189238 (diff)
libmsc/gsm_04_11.c: introduce and use gsm411_assign_sm_rp_mr()
Initially, 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... 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 being increased! It 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 again. Moreover, there might be already a MO SMS transaction, and using the conn->next_rp_ref counter wouldn't prevent us from having duplicate SM-RP-MR value. Let's get rid of this per-connection counter, and introduce a function instead, that would iterate over existing transactions and look for an unused SM-RP-MR value. This change makes the following test cases pass: - TC_gsup_mt_sms_rp_mr, - TC_gsup_mo_mt_sms_rp_mr. Discovered by: Neels Hofmeyr Related Change-Id: (TTCN) I3a52d44f4abde9b6b471b9108c1cee905884c9bc Related Change-Id: (TTCN) I17cbbaa64d9bce770f985588e93cd3eecd732120 Change-Id: Ife6d954c46b7d8348a4221ab677d0355eb3ee7ac
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/msc/ran_conn.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/osmocom/msc/ran_conn.h b/include/osmocom/msc/ran_conn.h
index bec7201a1..affebc8d9 100644
--- a/include/osmocom/msc/ran_conn.h
+++ b/include/osmocom/msc/ran_conn.h
@@ -102,8 +102,6 @@ struct ran_conn {
/* LU expiration handling */
uint8_t expire_timer_stopped;
- /* SMS helpers for libmsc */
- uint8_t next_rp_ref;
/* Are we part of a special "silent" call */
int silent_call;