diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-08-13 17:06:17 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2019-09-03 16:42:07 +0200 |
commit | 87482b335c79643f2908406f1fe29af4b759e595 (patch) | |
tree | 8e4febae3657f762972321bc25e1f96167ecb361 | |
parent | 80307924f16d89d8d86fe9c4692d4f565174bacd (diff) |
iu_client: ensure UE is not NULL on CO primitives
When ue_conn_ctx_find() can not find a UE it returns NULL.
Change-Id: I63222fda6778417b1c986cb05772fecc51c43bb5
-rw-r--r-- | src/iu_client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/iu_client.c b/src/iu_client.c index b5f3557..8da9a43 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -796,6 +796,9 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu) LOGPIU(LOGL_DEBUG, "N-DISCONNECT.ind(%u)\n", prim->u.disconnect.conn_id); ue = ue_conn_ctx_find(prim->u.disconnect.conn_id); + if (!ue) + break; + rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg)); break; case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION): @@ -804,6 +807,9 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu) osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); /* resolve UE context */ ue = ue_conn_ctx_find(prim->u.data.conn_id); + if (!ue) + break; + rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg)); break; case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION): |