laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/33642 )
Change subject: M3UA/SUA: Don't add empty routing context IE in DUNA/DAVA
......................................................................
M3UA/SUA: Don't add empty routing context IE in DUNA/DAVA
Before this patch, the code generating a DUNA or DAVA message would
potentially generate a ROUTE_CTX IE with zero-length content, rather
than skipping such an IE altogether if no routing context[s] are given.
Change-Id: I19d0382cd2d428a91ac716182b9d86dcdc2c2ebd
Related: SYS#6511
---
M src/m3ua.c
M src/sua.c
2 files changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/42/33642/1
diff --git a/src/m3ua.c b/src/m3ua.c
index 8d82522..4c5d8d4 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -827,7 +827,7 @@
xua->hdr = XUA_HDR(M3UA_MSGC_SNM, M3UA_SNM_DUPU);
xua->hdr.version = M3UA_VERSION;
- if (rctx)
+ if (rctx && num_rctx)
xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, num_rctx * sizeof(*rctx), (const uint8_t
*)rctx);
xua_msg_add_u32(xua, M3UA_IEI_AFFECTED_PC, dpc);
diff --git a/src/sua.c b/src/sua.c
index a20d751..2a03f22 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -838,7 +838,7 @@
xua->hdr = XUA_HDR(SUA_MSGC_SNM, SUA_SNM_DUNA);
xua->hdr.version = SUA_VERSION;
- if (rctx)
+ if (rctx && num_rctx)
xua_msg_add_data(xua, SUA_IEI_ROUTE_CTX, num_rctx * sizeof(*rctx), (const uint8_t
*)rctx);
xua_msg_add_u32(xua, SUA_IEI_AFFECTED_PC, dpc);
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/33642
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I19d0382cd2d428a91ac716182b9d86dcdc2c2ebd
Gerrit-Change-Number: 33642
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange