From 5960ba387aa84574fc8b9df20ea98ca1594d1658 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 2 Mar 2011 21:56:03 +0100 Subject: sctp: Handle establish request for a wrong ASP The MSC we test is not sending an ASP Active when the link is unblocked. If the m2ua_link has no connection associated we will forgive the MSC and active it. --- src/sctp_m2ua.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sctp_m2ua.c b/src/sctp_m2ua.c index ebcb9ae..55aac91 100644 --- a/src/sctp_m2ua.c +++ b/src/sctp_m2ua.c @@ -284,11 +284,20 @@ 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) { - LOGP(DINP, LOGL_ERROR, - "Someone forgot the ASP Activate on link-index %d\n", - link->link_index); - return -1; + 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); -- cgit v1.2.3