From 4e783b9c901cf90e58c3f921bb17170ab23e540a Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 23 Mar 2020 23:24:19 +0000 Subject: tcp: avoid updating rcv wnd in resets Type: improvement Signed-off-by: Florin Coras Change-Id: I0884bf63db57b4b4dbccf41ab64c030b3fe4dde2 --- src/vnet/tcp/tcp_output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/vnet/tcp') 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, -- cgit 1.2.3-korg