socket receive buffer size & window updates
George Neville-Neil
gnn at neville-neil.com
Wed Mar 19 03:34:40 UTC 2014
On Mar 11, 2014, at 13:58 , Vijay Singh <vijju.singh at gmail.com> wrote:
> The socket option handler currently doesn't prevent connecting or connected
> sockets from changing their receive buffer sizes. In particular, I ran into
> a an application that sets the receive buffer size lower than what it
> originally was.
>
> In tcp_output(), if no data is being sent, there is code that is trying to
> decide if a window update is needed.
>
> If the socket receive buffer size was reduced after a larger window was
> already advertized, or perhaps even when there is data in the receive
> buffer, it seems to me that the computation in 592 could go -ve, and be
> interpreted as a large window update.
>
> I was led to this issue after observing in packet traces that duplicate
> FINs were being sent on close. I tracked it down to this check. Should this
> be changed to a check like such?
>
Interesting. Do you have a bit of test code?
Best,
George
More information about the freebsd-net
mailing list