Skip to content

Commit

Permalink
SCTP: Always flush the queue when uncorcking.
Browse files Browse the repository at this point in the history
When the code calls uncork, trigger a queue flush, even
if the queue was not corked.  Most callers that explicitely
cork the queue will have additinal checks to see if they 
corked it.  Callers who do not cork the queue expect packets
to flow when they call uncork.

The scneario that showcased this bug happend when we were not
able to bundle DATA with outgoing COOKIE-ECHO.  As a result
the data just sat in the outqueue and did not get transmitted.
The application expected a response, but nothing happened.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Vlad Yasevich committed Nov 9, 2007
1 parent fa7ff65 commit 7d54dc6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,9 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
int sctp_outq_uncork(struct sctp_outq *q)
{
int error = 0;
if (q->cork) {
if (q->cork)
q->cork = 0;
error = sctp_outq_flush(q, 0);
}
error = sctp_outq_flush(q, 0);
return error;
}

Expand Down

0 comments on commit 7d54dc6

Please sign in to comment.