http://git.etherboot.org
/
people
/
indolent
/
gpxe.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b34d4d0
)
TCP limits advertised TCP window to size of application window
author
Michael Brown
<mcb30@etherboot.org>
Sun, 8 Jul 2007 13:14:59 +0000
(14:14 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Sun, 8 Jul 2007 13:14:59 +0000
(14:14 +0100)
obtained via xfer_window().
src/net/tcp.c
patch
|
blob
|
history
diff --git
a/src/net/tcp.c
b/src/net/tcp.c
index
410be73
..
132a3a3
100644
(file)
--- 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 */