laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32035 )
Change subject: fix sccp_scoc state S_WAIT_CONN_CONF out_state_mask ......................................................................
fix sccp_scoc state S_WAIT_CONN_CONF out_state_mask
In sccp_scoc_states, allow the state transitions present in S_WAIT_CONN_CONF's event handler function scoc_fsm_wait_conn_conf(), and thus fix handling of N-DISCONNECT while waiting for SCCP Conn Confirm.
Fixes this error:
DLSCCP ERROR SCCP-SCOC(1016){WAIT_CONN_CONF}: transition to state IDLE not permitted! (sccp_scoc.c:1213)
S_WAIT_CONN_CONF happens when the caller sends an N-DISCONNECT during S_CONN_PEND_OUT -- that means, while we are waiting for a CC from the peer, the caller ends the conn. SCCP-SCOC still waits for the CC first.
When S_WAIT_CONN_CONF expires, the intended path is state change to S_IDLE, which then deallocates the connection. Allow this state transition from S_WAIT_CONN_CONF to S_IDLE.
When S_WAIT_CONN_CONF receives a CC, the intended path is to send a RELRE and state change to S_DISCONN_PEND. Allow this state transition from S_WAIT_CONN_CONF to S_DISCONN_PEND.
Change-Id: I8145e53124cabd76bd2cee159ab01306a1afaa27 --- M src/sccp_scoc.c 1 file changed, 31 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index db1db23..c929ed6 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -1468,6 +1468,8 @@ S(SCOC_E_CONN_TMR_EXP) | S(SCOC_E_RCOC_CREF_IND) | S(SCOC_E_RCOC_ROUT_FAIL_IND), + .out_state_mask = S(S_IDLE) | + S(S_DISCONN_PEND), }, };