aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-03 21:08:26 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-03 20:30:03 +0000
commitc2007855cebd240cf2868ce0d2dd90ba42ddfa8a (patch)
treeaceefffcb4f3dfb71f0dd440ec66302ee9e62b5f /include
parent6d28981912d90cb37b43f850710bc7674106542e (diff)
Implement checks for duplicate uplink UL L3 message
According to TS 24.007 Section 11.2.3.2.3, it is possible that uplink L3 messages are duplicated in some scenarios, particularly during assignment/handover procedure. To avoid L3 entities from seeing duplicated messages, there's a modulo-2 or modulo-4 message sequence counter, based on which the MSC can detect and suppress such duplicate messages. It appears that even our unit tests were wrong in that regard so far. Rather than manually adjusting each and every message, let's make sure that the sequence number generation always increments as expected, and that during matching of incoming messages, sequence numbers are masked out. Note: the tests will only pass from libosmocore Change-Id Iec875a77f5458322dfbef174f5abfc0e8c09d464 onwards, due to gsm48_hdr_msg_type() being broken in earlier versions. Change-Id: Id15e399ab7e1b05dcd426b292886fa19d36082b1 Closes: #2908
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/msc/gsm_data.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 27324d7b6..16e83f3bb 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -184,6 +184,9 @@ struct gsm_subscriber_connection {
uint16_t lac;
struct gsm_encr encr;
+ /* N(SD) expected in the received frame, per flow (TS 24.007 11.2.3.2.3.2.2) */
+ uint8_t n_sd_next[4];
+
struct {
unsigned int mgcp_rtp_endpoint;
uint16_t port_subscr;