pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26824 )
Change subject: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst ......................................................................
iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
Related: OS#5398 Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d --- M src/iu_client.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/24/26824/1
diff --git a/src/iu_client.c b/src/iu_client.c index da433da..846656f 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -461,6 +461,12 @@ struct msgb *msg; struct osmo_scu_prim *prim;
+ if (!uectx) { + LOGPIU(LOGL_ERROR, "Transmitting 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);
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26824 )
Change subject: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.osmocom.org/c/osmo-iuh/+/26824/1/src/iu_client.c File src/iu_client.c:
https://gerrit.osmocom.org/c/osmo-iuh/+/26824/1/src/iu_client.c@465 PS1, Line 465: LOG I think this is actually misleading. The Log message says "Transmitting" but the code is actually discarding the message. "Discarding to-be-transmitted L3 message ..."?
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-iuh/+/26824
to look at the new patch set (#2).
Change subject: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst ......................................................................
iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
Related: OS#5398 Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d --- M src/iu_client.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/24/26824/2
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26824 )
Change subject: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst ......................................................................
Patch Set 2: Code-Review+2
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26824 )
Change subject: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst ......................................................................
iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
Related: OS#5398 Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d --- M src/iu_client.c 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
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 @@ 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);