pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34921?usp=email )
Change subject: sccp_scoc: Fix remote PC not assigned preventing RSLD to be sent in st WAIT_CONN_CONF ...................................................................... sccp_scoc: Fix remote PC not assigned preventing RSLD to be sent in st WAIT_CONN_CONF Scenario: RUA Connect triggers SCCP CR towards peer, and we move to CONN_PEND_OUT state where we expect to receive CC. However, if some timer (like X31) times out before we receive CC (eg because CC takes a long time to come), we end up in state WAIT_CONN_CONF. In that state, according to Figure C.2/Q.714 (sheet 2 of 7), among other possibilite we wait for CC, and if it arrives, we send an RLSD to the peer to inform him that we released the conn, and wait for the peer to ack the RLSD, then release all state. Given the scenario above, scoc_fsm_wait_conn_conf() was not assigning the received OPC from the CC to the conn->remote_pc (unlike scoc_fsm_conn_pend_out() which does it properly). As a result, when trying to send teh RLSD it would fail and never transmit RLSD, taking then a long time to release through T(rel) (10-20 seconds), and probably longer in the peer (T(iar) or similar?). Rua Connect triggers tx of SCCP CC: Received SCCP User Primitive (N-CONNECT.request) XUA_AS(as-clnt-msc-0)[0x55f11c7df980]{AS_ACTIVE}: Received Event AS-TRANSFER.req //Tx CC SCCP-SCOC(929)[0x55f11c909c90]{IDLE}: State change to CONN_PEND_OUT (no timeout) ... X31 timeout triggers state change: map_sccp(...-SCCP-929)[0x55f11c909820]{wait_cc}: Timeout of X31 SCCP-SCOC(929)[0x55f11c909c90]{CONN_PEND_OUT}: Received Event N-DISCONNECT.req SCCP-SCOC(929)[0x55f11c909c90]{CONN_PEND_OUT}: State change to WAIT_CONN_CONF (no timeout) ... CC arrives, but conn_remote_pc is not properly assigned and tx of RLSD fails: SCCP-SCOC(929)[0x55f11c909c90]{WAIT_CONN_CONF}: Received Event RCOC-CONNECT_CONFIRM.ind MTP-TRANSFER.req from SCCP without DPC?!? called=RI=0 // PROBLEM HERE!!!! SCCP-SCOC(929)[0x55f11c909c90]{WAIT_CONN_CONF}: State change to DISCONN_PEND (no timeout) ... SCCP-SCOC(929)[0x55f11c909c90]{DISCONN_PEND}: Received Event T(rel)_expired Related: SYS#6616 Change-Id: I9f9f78c92dd95f38af7b03037e60a1c993d7e5b0 --- M src/sccp_scoc.c 1 file changed, 52 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved daniel: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index e273d17..0e1eb34 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -1160,6 +1160,13 @@ conn_stop_connect_timer(conn); /* associate rem ref to conn */ conn->remote_ref = xua_msg_get_u32(xua, SUA_IEI_SRC_REF); + /* 3.1.4.2 The node sending the CC message (identified + * by the parameter OPC contained in the + * MTP-TRANSFER.indication primitive which conveyed the + * CC message [plus the MTP-SAP instance]) is associated + * with the connection section. */ + conn->remote_pc = xua->mtp.opc; + /* released to SCRC */ xua_gen_relre_and_send(conn, conn->release_cause, NULL); /* start rel timer */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34921?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I9f9f78c92dd95f38af7b03037e60a1c993d7e5b0 Gerrit-Change-Number: 34921 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillm...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: neels <nhofm...@sysmocom.de> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged