mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
TCP limits advertised TCP window to size of application window
obtained via xfer_window().
This commit is contained in:
parent
b34d4d0449
commit
35afb379af
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user