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/+/15874 )
Change subject: xua: Verify all route ctxs received in ASPAC msg
......................................................................
xua: Verify all route ctxs received in ASPAC msg
Change-Id: I16ad0847d671522c8942b441db7e4c460f4f142b
---
M src/xua_asp_fsm.c
1 file changed, 10 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index db4ffcb..1b39639 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -416,6 +416,9 @@
struct osmo_ss7_asp *asp = xafp->asp;
struct xua_msg *xua_in;
uint32_t traf_mode;
+ struct xua_msg_part *part;
+ uint32_t rctx;
+ int i;
check_stop_t_ack(fi, event);
switch (event) {
@@ -456,11 +459,13 @@
break;
}
}
- if (xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX)) {
- uint32_t rctx = xua_msg_get_u32(xua_in, M3UA_IEI_ROUTE_CTX);
- if (!osmo_ss7_as_find_by_rctx(asp->inst, rctx)) {
- peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX);
- break;
+ if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) {
+ for (i = 0; i < part->len / sizeof(uint32_t); i++) {
+ rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]);
+ if (!osmo_ss7_as_find_by_rctx(asp->inst, rctx)) {
+ peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX);
+ break;
+ }
}
}
/* send ACK */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15874
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I16ad0847d671522c8942b441db7e4c460f4f142b
Gerrit-Change-Number: 15874
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191028/e842c783/attachment.htm>