Change in osmo-iuh[master]: iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
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); -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d Gerrit-Change-Number: 26824 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
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 ..."? -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d Gerrit-Change-Number: 26824 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge@osmocom.org> Gerrit-Comment-Date: Mon, 10 Jan 2022 13:59:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
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 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d Gerrit-Change-Number: 26824 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge@osmocom.org> Gerrit-MessageType: newpatchset
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 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d Gerrit-Change-Number: 26824 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Comment-Date: Tue, 11 Jan 2022 17:08:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
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); -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d Gerrit-Change-Number: 26824 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (2)
-
laforge -
pespin