summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/tcpip.go
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-08-16 19:30:59 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-16 19:32:14 -0700
commit3e4102b2ead18aa768e1b8082d9865a9c567ce4e (patch)
tree2566b0ba4f3f48effd854017924392800aceb691 /pkg/tcpip/tcpip.go
parent661b2b9f69855b6900195af84bf549341bdda0fe (diff)
netstack: disconnect an unix socket only if the address family is AF_UNSPEC
Linux allows to call connect for ANY and the zero port. PiperOrigin-RevId: 263892534
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r--pkg/tcpip/tcpip.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index ba2dd85b8..29a6025d9 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -358,6 +358,9 @@ type Endpoint interface {
// ErrAddressFamilyNotSupported must be returned.
Connect(address FullAddress) *Error
+ // Disconnect disconnects the endpoint from its peer.
+ Disconnect() *Error
+
// Shutdown closes the read and/or write end of the endpoint connection
// to its peer.
Shutdown(flags ShutdownFlags) *Error