Index: sys/netinet/tcp_output.c =================================================================== --- sys/netinet/tcp_output.c +++ sys/netinet/tcp_output.c @@ -1237,8 +1237,11 @@ if (flags & TH_SYN) th->th_win = htons((u_short) (min(sbspace(&so->so_rcv), TCP_MAXWIN))); - else + else { th->th_win = htons((u_short)(recwin >> tp->rcv_scale)); + if ((th->th_win == 0) && (recwin > 0)) + th->th_win = htons(1); + } /* * Adjust the RXWIN0SENT flag - indicate that we have advertised Index: sys/netinet/tcp_stacks/bbr.c =================================================================== --- sys/netinet/tcp_stacks/bbr.c +++ sys/netinet/tcp_stacks/bbr.c @@ -13753,8 +13753,11 @@ if (flags & TH_SYN) th->th_win = htons((u_short) (min(sbspace(&so->so_rcv), TCP_MAXWIN))); - else + else { th->th_win = htons((u_short)(recwin >> tp->rcv_scale)); + if ((th->th_win == 0) && (recwin > 0)) + th->th_win = htons(1); + } /* * Adjust the RXWIN0SENT flag - indicate that we have advertised a 0 * window. This may cause the remote transmitter to stall. This Index: sys/netinet/tcp_stacks/rack.c =================================================================== --- sys/netinet/tcp_stacks/rack.c +++ sys/netinet/tcp_stacks/rack.c @@ -9570,8 +9570,11 @@ if (flags & TH_SYN) th->th_win = htons((u_short) (min(sbspace(&so->so_rcv), TCP_MAXWIN))); - else + else { th->th_win = htons((u_short)(recwin >> tp->rcv_scale)); + if ((th->th_win == 0) && (recwin > 0)) + th->th_win = htons(1); + } /* * Adjust the RXWIN0SENT flag - indicate that we have advertised a 0 * window. This may cause the remote transmitter to stall. This