aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-10-21 19:28:36 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-21 19:28:36 -0400
commit75e3d8db531b462b875c1adb13eeb6b0be7374c0 (patch)
treede2d38e5a4c056968eed4b35be4a76948743b583
parent2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff)
tcp: should use number of sack blocks instead of -1
While looking for the recent "sack issue" I also read all eff_sacks usage that was played around by some relevant commit. I found out that there's another thing that is asking for a fix (unrelated to the "sack issue" though). This feature has probably very little significance in practice. Opposite direction timeout with bidirectional tcp comes to me as the most likely scenario though there might be other cases as well related to non-data segments we send (e.g., response to the opposite direction segment). Also some ACK losses or option space wasted for other purposes is necessary to prevent the earlier SACK feedback getting to the sender. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 990a58493235..de54f02f10a9 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -432,7 +432,7 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
432 432
433 if (tp->rx_opt.dsack) { 433 if (tp->rx_opt.dsack) {
434 tp->rx_opt.dsack = 0; 434 tp->rx_opt.dsack = 0;
435 tp->rx_opt.eff_sacks--; 435 tp->rx_opt.eff_sacks = tp->rx_opt.num_sacks;
436 } 436 }
437 } 437 }
438} 438}