[SCTP]: Fix SACK sequence during shutdown
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 16 Jan 2007 03:20:21 +0000 (19:20 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 24 Jan 2007 04:25:47 +0000 (20:25 -0800)
Currently, when association enters SHUTDOWN state,the
implementation will SACK any DATA first and then transmit
the SHUTDOWN chunk.  This is against the order required by
2960bis spec.  SHUTDOWN must always be first, followed by
SACK. This change forces this order and also enables bundling.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_sideeffect.c

index 7bbc615..8bd3097 100644 (file)
@@ -217,7 +217,7 @@ static int sctp_gen_sack(struct sctp_association *asoc, int force,
 
                asoc->peer.sack_needed = 0;
 
-               error = sctp_outq_tail(&asoc->outqueue, sack);
+               sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(sack));
 
                /* Stop the SACK timer.  */
                sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,