diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-06-01 17:51:58 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-01 17:51:58 +0000 |
commit | 90c84c8bac49c2b8c92e099dfc0e4fe7a8f36b4e (patch) | |
tree | e4e4186178062a24417e21f0503c54c8df217db0 /pkg/tcpip | |
parent | eda688cd9ce01a5105aa6ca1470852b132ffa7a0 (diff) | |
parent | 77dc0f5bc94dff28fa23812f3ad60a8b01e91138 (diff) |
Merge release-20210518.0-64-g77dc0f5bc (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/transport/tcp/accept.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/accept.go b/pkg/tcpip/transport/tcp/accept.go index 2c65b737d..2b5abd3ee 100644 --- a/pkg/tcpip/transport/tcp/accept.go +++ b/pkg/tcpip/transport/tcp/accept.go @@ -560,6 +560,10 @@ func (e *endpoint) handleListenSegment(ctx *listenContext, s *segment) tcpip.Err } switch { + case s.flags.Contains(header.TCPFlagRst): + e.stack.Stats().DroppedPackets.Increment() + return nil + case s.flags == header.TCPFlagSyn: if e.acceptQueueIsFull() { e.stack.Stats().TCP.ListenOverflowSynDrop.Increment() @@ -611,7 +615,7 @@ func (e *endpoint) handleListenSegment(ctx *listenContext, s *segment) tcpip.Err e.stack.Stats().TCP.ListenOverflowSynCookieSent.Increment() return nil - case (s.flags & header.TCPFlagAck) != 0: + case s.flags.Contains(header.TCPFlagAck): if e.acceptQueueIsFull() { // Silently drop the ack as the application can't accept // the connection at this point. The ack will be @@ -753,6 +757,7 @@ func (e *endpoint) handleListenSegment(ctx *listenContext, s *segment) tcpip.Err return nil default: + e.stack.Stats().DroppedPackets.Increment() return nil } } |