aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-10-17 10:08:02 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-30 13:35:33 +0100
commit15aa0da1d3e38bd03422aac10ee750ce2a385af5 (patch)
tree018cb87c28e647433ec01bfc8bdb7bcd205480ec
parent61438f7bce327b8e6f9ec84d6ef0f5a115f8a743 (diff)
sgsn: Do not die in _bssgp_tx_dl_ud on TLLI mismatch (TODO)
Currently an OSMO_ASSERT fails, if the message's and the mmctx's TLLIs do not match. This commit turns the assertion into an ERROR log message and uses the default values for IMSI, DRX, and RA CAP instead of the MM context values in this case. TODO: - find the real source for the problem - add test cases derived from what is being described in the ticket Ticket: OW#1322 Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/src/gprs/gprs_llc.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 936354a09..6259eb58e 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -65,16 +65,27 @@ static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
* not yet have a MMC context (e.g. XID negotiation of primarly
* LLC connection fro GMM sapi). */
if (mmctx) {
- dup.imsi = mmctx->imsi;
- dup.drx_parms = mmctx->drx_parms;
- dup.ms_ra_cap.len = mmctx->ms_radio_access_capa.len;
- dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf;
-
/* make sure we only send it to the right llme */
- OSMO_ASSERT(msgb_tlli(msg) == mmctx->llme->tlli
- || msgb_tlli(msg) == mmctx->llme->old_tlli
- || tlli_foreign2local(msgb_tlli(msg)) == mmctx->llme->tlli
- || tlli_foreign2local(msgb_tlli(msg)) == mmctx->llme->old_tlli);
+ if (msgb_tlli(msg) != mmctx->llme->tlli &&
+ msgb_tlli(msg) != mmctx->llme->old_tlli &&
+ tlli_foreign2local(msgb_tlli(msg)) != mmctx->llme->tlli &&
+ tlli_foreign2local(msgb_tlli(msg)) != mmctx->llme->old_tlli)
+ {
+ LOGP(DLLC, LOGL_ERROR,
+ "MM context TLLI mismatch when sending DL unitdata, "
+ "msg TLLI = %08x, ctx TLLI = %08x, "
+ "ctx old TLLI = %08x. "
+ "Using default values for IMSI, DRX, RA CAP\n",
+ msgb_tlli(msg),
+ mmctx->llme->tlli,
+ mmctx->llme->old_tlli);
+ osmo_log_backtrace(DLLC, LOGL_INFO);
+ } else {
+ dup.imsi = mmctx->imsi;
+ dup.drx_parms = mmctx->drx_parms;
+ dup.ms_ra_cap.len = mmctx->ms_radio_access_capa.len;
+ dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf;
+ }
}
memcpy(&dup.qos_profile, qos_profile_default,
sizeof(qos_profile_default));