pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40694?usp=email )
Change subject: sccp: MTP-TRANSFER.req: Set OPC before route lookup
......................................................................
sccp: MTP-TRANSFER.req: Set OPC before route lookup
Before this commit, all SCCP UNIT-DATA.req came with unset xua->mtp.opc
and hence route lookup was done with opc=0 in mtp route label.
Since loadsharing may take into account some OPC bits to distribute
traffic, set the OPC properly before route lookup.
Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
---
M src/sccp_scrc.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/94/40694/1
diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index e28e584..d8239e3 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -142,6 +142,7 @@
struct xua_msg *xua,
const struct osmo_sccp_addr *called)
{
+ struct osmo_sccp_addr calling;
struct osmo_ss7_route *rt;
struct osmo_ss7_route_label rtlabel;
@@ -159,6 +160,11 @@
* primitive and send it via link
*/
+ if (sua_addr_parse(&calling, xua, SUA_IEI_SRC_ADDR) == 0 &&
+ (calling.presence & OSMO_SCCP_ADDR_T_PC))
+ xua->mtp.opc = calling.pc;
+
+
if (called->presence & OSMO_SCCP_ADDR_T_PC)
xua->mtp.dpc = called->pc;
if (!xua->mtp.dpc) {
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40694?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
Gerrit-Change-Number: 40694
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>