[TCP]: Prevent sending past receiver window with TSO (at last skb)
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Wed, 12 Mar 2008 00:55:27 +0000 (17:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Mar 2008 00:55:27 +0000 (17:55 -0700)
commit5ea3a7480606cef06321cd85bc5113c72d2c7c68
tree202d758d85e60b2a38cd7dd57b41a47d97ebbce8
parent445815d7ea4f59baf103f28b45f7dd45f21ff75d
[TCP]: Prevent sending past receiver window with TSO (at last skb)

With TSO it was possible to send past the receiver window when the skb
to be sent was the last in the write queue while the receiver window
is the limiting factor. One can notice that there's a loophole in the
tcp_mss_split_point that lacked a receiver window check for the
tcp_write_queue_tail() if also cwnd was smaller than the full skb.

Noticed by Thomas Gleixner <tglx@linutronix.de> in form of "Treason
uncloaked! Peer ... shrinks window .... Repaired."  messages (the peer
didn't actually shrink its window as the message suggests, we had just
sent something past it without a permission to do so).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Tested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c