diff options
| author | Michael Brown | 2007-07-08 15:14:59 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-08 15:14:59 +0200 |
| commit | 35afb379af11ebe8a9edbca3a592c95f9491b9bd (patch) | |
| tree | d96f45efc609db6bbf91d50207012abda4f1a8d6 /src | |
| parent | Separate the "is data ready" function of xfer_seek() into an (diff) | |
| download | ipxe-35afb379af11ebe8a9edbca3a592c95f9491b9bd.tar.gz ipxe-35afb379af11ebe8a9edbca3a592c95f9491b9bd.tar.xz ipxe-35afb379af11ebe8a9edbca3a592c95f9491b9bd.zip | |
TCP limits advertised TCP window to size of application window
obtained via xfer_window().
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/tcp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c index 410be7374..132a3a37a 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -363,6 +363,7 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) { unsigned int flags; size_t len = 0; size_t seq_len; + size_t app_window; size_t window; int rc; @@ -412,6 +413,9 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) { window = ( ( freemem * 3 ) / 4 ); if ( window > TCP_MAX_WINDOW_SIZE ) window = TCP_MAX_WINDOW_SIZE; + app_window = xfer_window ( &tcp->xfer ); + if ( window > app_window ) + window = app_window; window &= ~0x03; /* Keep everything dword-aligned */ /* Fill up the TCP header */ |
