From: Baruch Even <[EMAIL PROTECTED]> Date: Mon, 29 Jan 2007 09:13:49 +0200
> When we check for SACK fast path make sure that we also have the same number > of > SACK blocks in the cache and in the new SACK data. This prevents us from > mistakenly taking the cache data if the old data in the SACK cache is the same > as the data in the SACK block. > > Signed-Off-By: Baruch Even <[EMAIL PROTECTED]> We could implement this without extra state, for example by clearing out the rest of the recv_sack_cache entries. We should never see a SACK block from sequence zero to zero, which would be an empty SACK block. Something like the following? diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c26076f..84cd722 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -999,6 +1001,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ return 0; } } + for (; i <= 4; i++) { + tp->recv_sack_cache[i].start_seq = 0; + tp->recv_sack_cache[i].end_seq = 0; + } if (flag) num_sacks = 1; - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html