pespin submitted this change.

View Change

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
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(-)

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 change 40694. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I85e1d6c48f3c9082dcfaaeaa97a805cc0a372463
Gerrit-Change-Number: 40694
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>