DragonFly BSD
DragonFly commits List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: git: network - Move socket from netmsg ext to netmsg header, add port to socket

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Dec 2009 12:19:20 -0800 (PST)

:+#endif /* INET6 */
:+		error = tcp_connect(tp, flags, m, nam, td);
:+#if 0
:+		/* WTF is this doing here? */
:+		tp->snd_wnd = TTCP_CLIENT_SND_WND;
:+		tcp_mss(tp, -1);
:+		goto out;
:+	}
:Those lines are there for T/TCP support. When using T/TCP, you send the
:data in the SYN packet so you don't have any window information from the
:server. RFC1644 suggests using a 4K window by default. Similarly, the -1
:Given that pretty much nobody uses T/TCP (Linux doesn't even implement
:it) I'd suggest we remove it altogether. Otherwise, we should revert at
:least the change above (of course, I would not be surprised if T/TCP has
:been broken for years and nobody noticed ;)

    I'd say remove it alltogether.  The problem with reverting the change
    is that the MSS code #if 0'd out above is not really compatible
    with the the MSS tcp option, and the unconditional snd_wnd update
    seems to override more appropriate defaults (at least during my testing)
    set prior to the code hitting that point.

    T/TCP doesn't work well with the syncache, opens us up to DOS attacks
    (holding bulk data before the handshake sequence is complete), but the
    biggest problem I had when I was doing that work was that the data has
    to be forwarded to the protocol thread on the correct port in some other
    piece of code... I forget exactly which piece of code it was but it was
    a real mess to deal with.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]