gvisor/pkg/tcpip
Ian Gudger c6bdc6b05b Fix a race in TCP endpoint teardown and teardown the stack in tcp_test.
Call stack.Close on stacks when we are done with them in tcp_test. This avoids
leaking resources and reduces the test's flakiness when race/gotsan is enabled.
It also provides test coverage for the race also fixed in this change, which
can be reliably triggered with the stack.Close change (and without the other
changes) when race/gotsan is enabled.

The race was possible when calling Abort (via stack.Close) on an endpoint
processing a SYN segment as part of a passive connect.

Updates #1564

PiperOrigin-RevId: 297685432
2020-02-27 14:15:44 -08:00
..
adapters/gonet Add support for tearing down protocol dispatchers and TIME_WAIT endpoints. 2020-02-24 10:32:17 -08:00
buffer Implement tap/tun device in vfs. 2020-02-21 15:42:56 -08:00
checker Enable IPV6_RECVTCLASS socket option for datagram sockets 2020-02-18 15:45:36 -08:00
hash/jenkins Standardize on tools directory. 2020-01-27 12:21:00 -08:00
header Use link-local source address for link-local multicast 2020-02-25 15:16:16 -08:00
iptables We can now create and jump in iptables. For example: 2020-02-13 17:02:50 -08:00
link Implement tap/tun device in vfs. 2020-02-21 15:42:56 -08:00
network Add support for tearing down protocol dispatchers and TIME_WAIT endpoints. 2020-02-24 10:32:17 -08:00
ports Standardize on tools directory. 2020-01-27 12:21:00 -08:00
sample Standardize on tools directory. 2020-01-27 12:21:00 -08:00
seqnum Standardize on tools directory. 2020-01-27 12:21:00 -08:00
stack Use link-local source address for link-local multicast 2020-02-25 15:16:16 -08:00
transport Fix a race in TCP endpoint teardown and teardown the stack in tcp_test. 2020-02-27 14:15:44 -08:00
BUILD Standardize on tools directory. 2020-01-27 12:21:00 -08:00
packet_buffer.go Fixing stuff 2020-01-21 13:37:25 -08:00
packet_buffer_state.go Use PacketBuffers for outgoing packets. 2019-11-14 10:15:38 -08:00
tcpip.go Add support for tearing down protocol dispatchers and TIME_WAIT endpoints. 2020-02-24 10:32:17 -08:00
tcpip_test.go Implement proper local broadcast behavior 2019-10-03 19:31:35 -07:00
time.s Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
time_unsafe.go Initial network namespace support. 2020-02-20 15:20:40 -08:00
timer.go CancellableTimer to encapsulate the work of safely stopping timers 2020-01-08 17:50:54 -08:00
timer_test.go Put CancellableTimer tests in the tcpip_test package 2020-01-10 14:32:17 -08:00