Commit:     db3ccdac261e015023cfd922840170f14c9cdc09
Parent:     dbcb5855d108b7fa20ab42567a5412ce9dcd776a
Author:     Baruch Even <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 25 13:35:06 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 25 13:35:06 2007 -0800

    [TCP]: Fix sorting of SACK blocks.
    The sorting of SACK blocks actually munges them rather than sort,
    causing the TCP stack to ignore some SACK information and breaking the
    assumption of ordered SACK blocks after sorting.
    The sort takes the data from a second buffer which isn't moved causing
    subsequent data moves to occur from the wrong location. The fix is to
    use a temporary buffer as a normal sort does.
    Signed-off-By: Baruch Even <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/tcp_input.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 5c16e24..c26076f 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1011,10 +1011,11 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff 
*ack_skb, u32 prior_snd_
                        for (j = 0; j < i; j++){
                                if (after(ntohl(sp[j].start_seq),
-                                       sp[j].start_seq = 
-                                       sp[j].end_seq = 
-                                       sp[j+1].start_seq = 
-                                       sp[j+1].end_seq = 
+                                       struct tcp_sack_block_wire tmp;
+                                       tmp = sp[j];
+                                       sp[j] = sp[j+1];
+                                       sp[j+1] = tmp;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to