aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-10 06:40:17 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-15 12:02:02 +0000
commitc495daeeb22a84adc894264eeb9054598dbfe04a (patch)
treeb01bc384a6dcf15f5539a7c2ba2b26e38ec0a81c
parent54250f9e1f3de5f3bf513383f23bb2d03f10321f (diff)
sctp: Really apply the MSC workaround
The MSC workaround was added in 5960ba387aa84574fc8b9df20ea98ca1594d1658 but it has never worked as in 8fd28dbbe64cb32e5f296bd2679cebf03b5d14c0 (earlier) we were checking for link->conn != conn in the dispatch method. Move the code over to the generic dispatch and check for NULL.
-rw-r--r--src/sctp_m2ua.c25
1 files changed, 9 insertions, 16 deletions
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",