diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-05 00:07:06 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-05 00:07:06 +0000 |
commit | 100d8f4e88bfda450339ded775d34e5a24ad9354 (patch) | |
tree | 01b4982b9185ca31f88f37f29d0799c5e6adec09 /pkg/tcpip/transport | |
parent | 98983981e2c93a07a07577300b3377e6f66e11e1 (diff) | |
parent | a26a954946ad2e7910d3ad7578960a93b73a1f9b (diff) |
Merge release-20200127.0-67-ga26a954 (automated)
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r-- | pkg/tcpip/transport/tcp/connect.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index 9ff7ac261..5c5397823 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -989,6 +989,10 @@ func (e *endpoint) transitionToStateCloseLocked() { // to any other listening endpoint. We reply with RST if we cannot find one. func (e *endpoint) tryDeliverSegmentFromClosedEndpoint(s *segment) { ep := e.stack.FindTransportEndpoint(e.NetProto, e.TransProto, e.ID, &s.route) + if ep == nil && e.NetProto == header.IPv6ProtocolNumber && e.EndpointInfo.TransportEndpointInfo.ID.LocalAddress.To4() != "" { + // Dual-stack socket, try IPv4. + ep = e.stack.FindTransportEndpoint(header.IPv4ProtocolNumber, e.TransProto, e.ID, &s.route) + } if ep == nil { replyWithReset(s) s.decRef() |