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/+/16390 ) Change subject: xua_asp_fsm: Ensure xUA client includes routing contexts in ASPAC/ASPIA ...................................................................... xua_asp_fsm: Ensure xUA client includes routing contexts in ASPAC/ASPIA If we are running in ASP (client) role, and we are about to transmit an ASPAC or ASPIA to the SG, we must make sure to include any applicable routing contexts. Change-Id: Iee4f0d553d6845a9ae08cb5e4f57fdec443e4ef9 Related: OS#4285 --- M src/xua_asp_fsm.c 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index ff81edd..9f30559 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -168,6 +168,30 @@ return tmode; } +/* add M3UA_IEI_ROUTE_CTX to xua_msg containig all routing keys of ASs within ASP */ +static int xua_msg_add_asp_rctx(struct xua_msg *xua, struct osmo_ss7_asp *asp) +{ + struct osmo_ss7_as *as; + uint32_t rctx[128]; + unsigned int i = 0; + + /* iterate over all ASs and build array of routing contexts */ + llist_for_each_entry(as, &asp->inst->as_list, list) { + if (!osmo_ss7_as_has_asp(as, asp)) + continue; + rctx[i++] = htonl(as->cfg.routing_key.context); + if (i >= ARRAY_SIZE(rctx)-1) { + break; + } + } + /* add xUA IE with routing contests to the message (if any) */ + if (i) + xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, i*sizeof(uint32_t), (uint8_t *)rctx); + + /* return count of routing contexts added */ + return i; +} + /* ask the xUA implementation to transmit a specific message */ static int peer_send(struct osmo_fsm_inst *fi, int out_event, struct xua_msg *in) { @@ -220,6 +244,7 @@ if (rc >= 0) xua_msg_add_u32(xua, M3UA_IEI_TRAF_MODE_TYP, osmo_ss7_tmode_to_xua(rc)); /* Optional: Routing Context */ + xua_msg_add_asp_rctx(xua, asp); /* Optional: TID Label */ /* Optional: DRN Label */ /* Optional: Info String */ @@ -237,6 +262,7 @@ /* RFC3868 Ch. 3.6.3 */ xua->hdr = XUA_HDR(SUA_MSGC_ASPTM, SUA_ASPTM_INACTIVE); /* Optional: Routing Context */ + xua_msg_add_asp_rctx(xua, asp); /* Optional: Info String */ break; case XUA_ASP_E_ASPTM_ASPIA_ACK: -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16390 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Iee4f0d553d6845a9ae08cb5e4f57fdec443e4ef9 Gerrit-Change-Number: 16390 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191202/68235855/attachment.htm>