aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-23 23:24:19 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-03-25 15:22:20 +0000
commit4e783b9c901cf90e58c3f921bb17170ab23e540a (patch)
treebd11c6f28563a932520e900ec63cf9e6b839846c /src
parentb24e287b9295bcc3e904753e9e2bfde89d6666db (diff)
tcp: avoid updating rcv wnd in resets
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0884bf63db57b4b4dbccf41ab64c030b3fe4dde2
Diffstat (limited to 'src')
-rw-r--r--src/vnet/tcp/tcp_output.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index d33cbdd4ad4..aff2d932331 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -115,8 +115,6 @@ tcp_update_rcv_wnd (tcp_connection_t * tc)
u32 available_space, wnd;
i32 observed_wnd;
- ASSERT (tc->rcv_opts.mss < transport_rx_fifo_size (&tc->connection));
-
/*
* Figure out how much space we have available
*/
@@ -875,7 +873,7 @@ tcp_send_reset (tcp_connection_t * tc)
tc->snd_opts_len = tcp_make_options (tc, &tc->snd_opts, tc->state);
tcp_hdr_opts_len = tc->snd_opts_len + sizeof (tcp_header_t);
- advertise_wnd = tcp_window_to_advertise (tc, TCP_STATE_ESTABLISHED);
+ advertise_wnd = tc->rcv_wnd >> tc->rcv_wscale;
flags = TCP_FLAG_RST;
th = vlib_buffer_push_tcp (b, tc->c_lcl_port, tc->c_rmt_port, tc->snd_nxt,
tc->rcv_nxt, tcp_hdr_opts_len, flags,