pespin has submitted this change. ( 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(-)
Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
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) {