tcp: do not scale syn-ack window 87/42787/2
authorFlorin Coras <[email protected]>
Fri, 11 Apr 2025 03:55:26 +0000 (23:55 -0400)
committerDave Wallace <[email protected]>
Fri, 11 Apr 2025 16:11:20 +0000 (16:11 +0000)
Type: fix

Change-Id: I1d677a8d80065644a1ddfb3884d99feee04c4756
Signed-off-by: Florin Coras <[email protected]>
src/vnet/tcp/tcp_input.c

index 15b2c92..2d43cf0 100644 (file)
@@ -1883,8 +1883,8 @@ tcp46_syn_sent_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
       else
        new_tc->rcv_wscale = 0;
 
-      new_tc->snd_wnd = clib_net_to_host_u16 (tcp->window)
-                       << new_tc->snd_wscale;
+      /* RFC7323 sec 2.2: Window field in a syn segment must not be scaled */
+      new_tc->snd_wnd = clib_net_to_host_u16 (tcp->window);
       new_tc->snd_wl1 = seq;
       new_tc->snd_wl2 = ack;