diff --git a/src/sctp_m2ua.c b/src/sctp_m2ua.c index 66e3e87..9e29994 100644 --- a/src/sctp_m2ua.c +++ b/src/sctp_m2ua.c @@ -311,22 +311,6 @@ static int m2ua_handle_state_req(struct mtp_m2ua_link *link, uint32_t index; int req; - /* fixup for a broken MSC */ - if (link->conn != conn) { - if (!link->conn) { - LOGP(DINP, LOGL_NOTICE, - "No ASP Activate but no connection is on link-index %d.\n", - link->link_index); - link->conn = conn; - link->asp_active = 1; - } else { - LOGP(DINP, LOGL_ERROR, - "Someone forgot the ASP Activate on link-index %d\n", - link->link_index); - return -1; - } - } - state = m2ua_msg_find_tag(m2ua, M2UA_TAG_STATE_REQ); if (!state || state->len != 4) { LOGP(DINP, LOGL_ERROR, "Mandantory state request not present.\n"); @@ -474,6 +458,15 @@ static int m2ua_handle_maup(struct mtp_m2ua_link *link, return -1; } + /* fixup for a broken MSC */ + if (!link->conn && m2ua->hdr.msg_type == M2UA_MAUP_STATE_REQ) { + LOGP(DINP, LOGL_NOTICE, + "No ASP Activate but no connection is on link-index %d.\n", + link->link_index); + link->conn = conn; + link->asp_active = 1; + } + if (link->conn != conn) { LOGP(DINP, LOGL_ERROR, "Someone forgot the ASP Activate on link-index %d\n",