pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42210?usp=email )
Change subject: tcap: Fix return code in tcap_as_rx_sccp_asp() ......................................................................
tcap: Fix return code in tcap_as_rx_sccp_asp()
That code path is not an error, simply the message is not TCAP.
Take the chance to clarify the behavior of the function.
Change-Id: I54c4a1bbaa8e107cf433cc898658a672c2b53c3c --- M src/tcap_as_loadshare.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c index 9c969d3..336692d 100644 --- a/src/tcap_as_loadshare.c +++ b/src/tcap_as_loadshare.c @@ -270,7 +270,7 @@ * @param opc M3UA opc * @param dpc M3UA DPC * @param sccp_msg pointer to a msg. - * @return 0 on successful handling, < 0 on error cases (missing IE, decoding errors) + * @return 0 on successful handling (TCAP fully processed, non-TCAP ignored), < 0 on error cases (missing IE, decoding errors) */ int tcap_as_rx_sccp_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp, uint32_t opc, uint32_t dpc, struct msgb *sccp_msg) { @@ -286,7 +286,7 @@
/* TCAP uses only connectionless SCCP messages */ if (sua->hdr.msg_class != SUA_MSGC_CL && sua->hdr.msg_class != SUA_CL_CLDT) - return -2; + return 0;
rc = sua_addr_parse(&calling_addr, sua, SUA_IEI_SRC_ADDR); if (rc < 0) {