pespin submitted this change.
sccp_sclc: Remove SCCP cause mask in N-NOTICE.ind 'Reason for return' field
ITU Q.713 A.5 states "There is a one-to-one mapping between the return cause of
UDTS, XUDTS or LUDTS messages and the reason for return in the N-NOTICE
primitives".
This matches with the list of strings listed in ITU Q.711 6.2.2.2.4
"Reason for return".
"return cause" can in turn be found in ITU Q.713 3.12.
During sccp_sclc_rx_scrc_rout_fail(), we are encoding the "return cause"
param into the xua_msg usig gen_ret_msg(), which encodes it as SUA by
prepending the SUA_CAUSE_T_RETURN bitmask cause-type to it.
However, when constructing the primitive N-NOTICE.ind, we need to remove
that mask when filling in "Reason for return".
Change-Id: Iccff1e8809769edae36081a79119eb8da901841a
---
M include/osmocom/sigtran/sccp_sap.h
M src/sccp_sclc.c
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h
index 65eff74..7399b3d 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -256,8 +256,10 @@
struct osmo_scu_notice_param {
struct osmo_sccp_addr called_addr;
struct osmo_sccp_addr calling_addr;
+ /* ITU Q.711 6.2.2.2.4 "Reason for return":
+ * enum sccp_return_cause (ITU Q.713 3.12), as per ITU Q.713 A.5. */
uint32_t cause;
- uint32_t importance;
+ uint32_t importance; /* ITU Q.711 6.2.2.2.6, Q.713 3.19 */
/* user data */
};
diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c
index c7dce89..0a47cd9 100644
--- a/src/sccp_sclc.c
+++ b/src/sccp_sclc.c
@@ -287,7 +287,7 @@
}
param->importance = xua_msg_get_u32(xua, SUA_IEI_IMPORTANCE);
- param->cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE);
+ param->cause = xua_msg_get_u32(xua, SUA_IEI_CAUSE) & ~SUA_CAUSE_T_MASK;
scu = sccp_user_find(inst, param->called_addr.ssn,
param->called_addr.pc);
To view, visit change 40702. To unsubscribe, or for help writing mail filters, visit settings.