mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
wgengine/netstack: clarify a comment
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
ae9b3f38d6
commit
83906abc5e
@ -509,12 +509,14 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
|
|||||||
}
|
}
|
||||||
r.Complete(false)
|
r.Complete(false)
|
||||||
|
|
||||||
// Asynchronously start the TCP handshake. Note that the
|
// The ForwarderRequest.CreateEndpoint above asynchronously
|
||||||
// gonet.TCPConn methods c.RemoteAddr() and c.LocalAddr() will
|
// starts the TCP handshake. Note that the gonet.TCPConn
|
||||||
// return nil until the handshake actually completes. But we
|
// methods c.RemoteAddr() and c.LocalAddr() will return nil
|
||||||
// have the remote address in reqDetails instead, so we don't
|
// until the handshake actually completes. But we have the
|
||||||
// use RemoteAddr. The byte copies in both directions in
|
// remote address in reqDetails instead, so we don't use
|
||||||
// forwardTCP will block until the TCP handshake is complete.
|
// gonet.TCPConn.RemoteAddr. The byte copies in both
|
||||||
|
// directions to/from the gonet.TCPConn in forwardTCP will
|
||||||
|
// block until the TCP handshake is complete.
|
||||||
c := gonet.NewTCPConn(&wq, ep)
|
c := gonet.NewTCPConn(&wq, ep)
|
||||||
|
|
||||||
if ns.ForwardTCPIn != nil {
|
if ns.ForwardTCPIn != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user