diff --git a/src/iu_client.c b/src/iu_client.c index b5f35574..8da9a439 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):