aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-03-02 21:56:03 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-03-02 21:56:03 +0100
commit5960ba387aa84574fc8b9df20ea98ca1594d1658 (patch)
treec42896e78acdb5db4172d4bfb5c1c0683cd23b31 /src
parentfb5b6dc80e1cc6812a71faa72a96bc7708e64fc7 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/sctp_m2ua.c17
1 files changed, 13 insertions, 4 deletions
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);