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

看板DFBSD_commit作者時間16年前 (2009/12/09 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/11 (看更多)
:... :+#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); :+#endif :+ 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 ;) : :Aggelos 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. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1B7hV8SS (DFBSD_commit)
討論串 (同標題文章)
完整討論串 (本文為第 6 之 11 篇):
文章代碼(AID): #1B7hV8SS (DFBSD_commit)