|
@@ -53,6 +53,7 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg)
|
|
|
msg->send_failed = 0;
|
|
msg->send_failed = 0;
|
|
|
msg->send_error = 0;
|
|
msg->send_error = 0;
|
|
|
msg->can_delay = 1;
|
|
msg->can_delay = 1;
|
|
|
|
|
+ msg->abandoned = 0;
|
|
|
msg->expires_at = 0;
|
|
msg->expires_at = 0;
|
|
|
INIT_LIST_HEAD(&msg->chunks);
|
|
INIT_LIST_HEAD(&msg->chunks);
|
|
|
}
|
|
}
|
|
@@ -304,6 +305,9 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
|
|
|
if (!chunk->asoc->peer.prsctp_capable)
|
|
if (!chunk->asoc->peer.prsctp_capable)
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
+ if (chunk->msg->abandoned)
|
|
|
|
|
+ return 1;
|
|
|
|
|
+
|
|
|
if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
|
|
if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
|
|
|
time_after(jiffies, chunk->msg->expires_at)) {
|
|
time_after(jiffies, chunk->msg->expires_at)) {
|
|
|
struct sctp_stream_out *streamout =
|
|
struct sctp_stream_out *streamout =
|
|
@@ -316,6 +320,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
|
|
|
chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
|
|
chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
|
|
|
streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
|
|
streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
|
|
|
}
|
|
}
|
|
|
|
|
+ chunk->msg->abandoned = 1;
|
|
|
return 1;
|
|
return 1;
|
|
|
} else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
|
|
} else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
|
|
|
chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
|
|
chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
|
|
@@ -324,10 +329,12 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
|
|
|
|
|
|
|
|
chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
|
chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
|
|
streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
|
streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
|
|
|
|
+ chunk->msg->abandoned = 1;
|
|
|
return 1;
|
|
return 1;
|
|
|
} else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) &&
|
|
} else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) &&
|
|
|
chunk->msg->expires_at &&
|
|
chunk->msg->expires_at &&
|
|
|
time_after(jiffies, chunk->msg->expires_at)) {
|
|
time_after(jiffies, chunk->msg->expires_at)) {
|
|
|
|
|
+ chunk->msg->abandoned = 1;
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
/* PRIO policy is processed by sendmsg, not here */
|
|
/* PRIO policy is processed by sendmsg, not here */
|