diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-29 01:24:26 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-29 01:24:26 +0000 |
commit | 5f94ff9ba002f81e87c3d2956bd448f360379049 (patch) | |
tree | 684abe18b33e7c78970533ecef90dfdc42c35dfc /pkg/tcpip/transport/tcp/accept.go | |
parent | ca3e612ef2ddc3741a6f33eccafdd5a571f63ede (diff) | |
parent | 0864549ecc26e734bae3dcf40e0d761232f8bdad (diff) |
Merge release-20190806.1-331-g0864549 (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp/accept.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/accept.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/tcpip/transport/tcp/accept.go b/pkg/tcpip/transport/tcp/accept.go index 65c346046..1dd00d026 100644 --- a/pkg/tcpip/transport/tcp/accept.go +++ b/pkg/tcpip/transport/tcp/accept.go @@ -400,6 +400,9 @@ func (e *endpoint) acceptQueueIsFull() bool { // handleListenSegment is called when a listening endpoint receives a segment // and needs to handle it. func (e *endpoint) handleListenSegment(ctx *listenContext, s *segment) { + // TODO(b/143300739): Use the userMSS of the listening socket + // for accepted sockets. + switch s.flags { case header.TCPFlagSyn: opts := parseSynSegmentOptions(s) @@ -434,13 +437,12 @@ func (e *endpoint) handleListenSegment(ctx *listenContext, s *segment) { // // Enable Timestamp option if the original syn did have // the timestamp option specified. - mss := mssForRoute(&s.route) synOpts := header.TCPSynOptions{ WS: -1, TS: opts.TS, TSVal: tcpTimeStamp(timeStampOffset()), TSEcr: opts.TSVal, - MSS: uint16(mss), + MSS: mssForRoute(&s.route), } e.sendSynTCP(&s.route, s.id, e.ttl, e.sendTOS, header.TCPFlagSyn|header.TCPFlagAck, cookie, s.sequenceNumber+1, ctx.rcvWnd, synOpts) e.stack.Stats().TCP.ListenOverflowSynCookieSent.Increment() |