summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/tcpip.go
diff options
context:
space:
mode:
authorEyal Soha <eyalsoha@google.com>2020-02-05 17:56:00 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-05 17:56:42 -0800
commitf3d95607036b8a502c65aa7b3e8145227274dbbc (patch)
treef077cba6b93e226535d0bb87567af9915651801e /pkg/tcpip/tcpip.go
parentf2d3efca1deded31a2929ea77c0eecf476764660 (diff)
recv() on a closed TCP socket returns ENOTCONN
From RFC 793 s3.9 p58 Event Processing: If RECEIVE Call arrives in CLOSED state and the user has access to such a connection, the return should be "error: connection does not exist" Fixes #1598 PiperOrigin-RevId: 293494287
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r--pkg/tcpip/tcpip.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index 0fa141d58..d29d9a704 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -1124,6 +1124,10 @@ type ReadErrors struct {
// InvalidEndpointState is the number of times we found the endpoint state
// to be unexpected.
InvalidEndpointState StatCounter
+
+ // NotConnected is the number of times we tried to read but found that the
+ // endpoint was not connected.
+ NotConnected StatCounter
}
// WriteErrors collects packet write errors from an endpoint write call.