Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84565070 authored by John Heffner's avatar John Heffner Committed by David S. Miller
Browse files

[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.

parent c873879c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk)
		 */
		if (window <= free_space - mss || window > free_space)
			window = (free_space/mss)*mss;
		else if (mss == full_space &&
		         free_space > window + full_space/2)
			window = free_space;
	}

	return window;