diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-01-10 14:04:31 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2022-01-11 17:08:45 +0000 |
commit | adec82f3b1c725e8a70d327b9592940fbdeaaff7 (patch) | |
tree | 419a034792fc90088d7ee181f466d5f93ee7ecc4 | |
parent | c0a0b2562bd65188b6d70d308cc7f595764deb97 (diff) |
iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
Related: OS#5398
Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d
-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 da433da..7d29903 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -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); |