This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/24218 ) Change subject: sccp_scrc: Ensure we have not just SSN but at least OPC+SSN in CallingParty ...................................................................... sccp_scrc: Ensure we have not just SSN but at least OPC+SSN in CallingParty There are implementations out there which send us traffic, specifically in this case SCMG (SST) that has only SSN in both Called and Calling Party. This means the inbound SST message is routed correctly to the local SCCP user of libosmo-sigtran. But when that local SCCP user responds with inverting Called/Calling Party, the new destination again just contains a SSN. As a result, we don't know where to route the message (we always need a PC). Change-Id: Id66ae960ebe3cb3b09c6dd5454f9ac9c073f46d7 Closes: OS#5146 --- M src/sccp_scrc.c 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve dexter: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index b46b4f2..1da3890 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -440,6 +440,26 @@ return scrc_local_out_common(inst, xua, &called); } +/* ensure the CallingParty address doesn't just contain SSN, but at least SSN+PC */ +static void ensure_opc_in_calling_ssn(struct osmo_sccp_instance *inst, + struct xua_msg *xua) +{ + struct osmo_sccp_addr calling; + + sua_addr_parse(&calling, xua, SUA_IEI_SRC_ADDR); + + /* if we route on SSN and only have a SSN in the address... */ + if (calling.ri == OSMO_SCCP_RI_SSN_PC && + calling.presence == OSMO_SCCP_ADDR_T_SSN) { + /* add the M3UA OPC to the address to ensure that the recipient + * can actually respond back to the source */ + calling.presence |= OSMO_SCCP_ADDR_T_PC; + calling.pc = xua->mtp.opc; + xua_msg_free_tag(xua, SUA_IEI_SRC_ADDR); + xua_msg_add_sccp_addr(xua, SUA_IEI_SRC_ADDR, &calling); + } +} + /* Figure C.1/Q.714 Sheet 1 of 12, after we converted the * MTP-TRANSFER.ind to SUA. */ int scrc_rx_mtp_xfer_ind_xua(struct osmo_sccp_instance *inst, @@ -461,6 +481,9 @@ } /* We only treat connectionless and CR below */ + /* ensure we have at least OPC+SSN and not just SSN in CallingParty (OS#5146) */ + ensure_opc_in_calling_ssn(inst, xua); + sua_addr_parse(&called, xua, SUA_IEI_DEST_ADDR); /* Route on GT? */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/24218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id66ae960ebe3cb3b09c6dd5454f9ac9c073f46d7 Gerrit-Change-Number: 24218 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-CC: osmith <osmith at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210517/6715245d/attachment.htm>