laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/32329 )
Change subject: ASPAC/ASPIA: Don't add routing context IE in ASP-role if routing
context 0
......................................................................
ASPAC/ASPIA: Don't add routing context IE in ASP-role if routing context 0
If there is only one routing key (and hence routing context, and hence
AS) within one ASP, *and* the routing context is configured as 0 (zero),
we should not include the routing context IE. This is the way how
libosmo-sigtran has always been special-casing routing context 0 meaning
"routing context is not used". However, that was only working in SG
role (typical STP use case). When operating in ASP role, the
special-case handling was missing, causing a routing context IE
containing zero to be included in the related transmitted M3UA ASPAC
and ASPIA messages.
Change-Id: I5ce89b393a3b950ab7fd1eace9038718c9efcc51
Closes: OS#6003
---
M src/xua_asp_fsm.c
1 file changed, 28 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/29/32329/1
diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index a93dbd2..0080497 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -181,8 +181,15 @@
}
}
/* add xUA IE with routing contests to the message (if any) */
- if (i)
+ if (i) {
+ /* bail out (and not add the IE) if there's only one routing context (and hence
+ * only one AS) within this ASP, and that routing context is zero, meaning no routing
+ * context IE shall be used */
+ if (i == 1 && rctx[0] == 0)
+ return 0;
+
xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, i*sizeof(uint32_t), (uint8_t *)rctx);
+ }
/* return count of routing contexts added */
return i;
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/32329
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I5ce89b393a3b950ab7fd1eace9038718c9efcc51
Gerrit-Change-Number: 32329
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange