iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst

Related: OS#5398
Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d
This commit is contained in:
Pau Espin 2022-01-10 14:04:31 +01:00 committed by laforge
parent c0a0b2562b
commit adec82f3b1
1 changed files with 6 additions and 0 deletions

View File

@ -461,6 +461,12 @@ int ranap_iu_tx(struct msgb *msg_nas, uint8_t sapi)
struct msgb *msg;
struct osmo_scu_prim *prim;
if (!uectx) {
LOGPIU(LOGL_ERROR, "Discarding to-be-transmitted L3 Message as RANAP DT with unset dst SCCP conn_id!\n",
uectx->conn_id);
return -ENOTCONN;
}
LOGPIU(LOGL_INFO, "Transmitting L3 Message as RANAP DT (SCCP conn_id %u)\n",
uectx->conn_id);