chunk.c (da86748bf60068e0d6ad56e5c919ca7e6782c4ba) chunk.c (05364ca03cfd419caecb292fede20eb39667eaae)
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2003, 2004
3 *
4 * This file is part of the SCTP kernel implementation
5 *
6 * This file contains the code relating the chunk abstraction.
7 *
8 * This SCTP implementation is free software;

--- 311 unchanged lines hidden (view full) ---

320
321 if (!chunk->has_tsn &&
322 !(chunk->chunk_hdr->flags & SCTP_DATA_FIRST_FRAG))
323 return 0;
324
325 if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
326 time_after(jiffies, chunk->msg->expires_at)) {
327 struct sctp_stream_out *streamout =
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2003, 2004
3 *
4 * This file is part of the SCTP kernel implementation
5 *
6 * This file contains the code relating the chunk abstraction.
7 *
8 * This SCTP implementation is free software;

--- 311 unchanged lines hidden (view full) ---

320
321 if (!chunk->has_tsn &&
322 !(chunk->chunk_hdr->flags & SCTP_DATA_FIRST_FRAG))
323 return 0;
324
325 if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
326 time_after(jiffies, chunk->msg->expires_at)) {
327 struct sctp_stream_out *streamout =
328 &chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
328 SCTP_SO(&chunk->asoc->stream,
329 chunk->sinfo.sinfo_stream);
329
330 if (chunk->sent_count) {
331 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
332 streamout->ext->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
333 } else {
334 chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
335 streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
336 }
337 chunk->msg->abandoned = 1;
338 return 1;
339 } else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
340 chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
341 struct sctp_stream_out *streamout =
330
331 if (chunk->sent_count) {
332 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
333 streamout->ext->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
334 } else {
335 chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
336 streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
337 }
338 chunk->msg->abandoned = 1;
339 return 1;
340 } else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
341 chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
342 struct sctp_stream_out *streamout =
342 &chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
343 SCTP_SO(&chunk->asoc->stream,
344 chunk->sinfo.sinfo_stream);
343
344 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
345 streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
346 chunk->msg->abandoned = 1;
347 return 1;
348 } else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) &&
349 chunk->msg->expires_at &&
350 time_after(jiffies, chunk->msg->expires_at)) {

--- 14 unchanged lines hidden ---
345
346 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
347 streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
348 chunk->msg->abandoned = 1;
349 return 1;
350 } else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) &&
351 chunk->msg->expires_at &&
352 time_after(jiffies, chunk->msg->expires_at)) {

--- 14 unchanged lines hidden ---