commit | fbee7f4fa2270621c190c936ad25138bfd78de5b | [log] [tgz] |
---|---|---|
author | Rahat Mahmood <rahat@google.com> | Thu Aug 08 12:32:00 2019 -0700 |
committer | Nicolas Lacasse <nlacasse@google.com> | Tue Aug 13 14:23:52 2019 -0700 |
tree | 2c498daebc8f934540feb1e1afabd76593782f57 | |
parent | f10d90d8feede94312220ad9ec0c3c5a3e767c97 [diff] |
netstack: Don't start endpoint goroutines too soon on restore. Endpoint protocol goroutines were previously started as part of loading the endpoint. This is potentially too soon, as resources used by these goroutine may not have been loaded. Protocol goroutines may perform meaningful work as soon as they're started (ex: incoming connect) which can cause them to indirectly access resources that haven't been loaded yet. This CL defers resuming all protocol goroutines until the end of restore. PiperOrigin-RevId: 262409429
Netstack is a network stack written in Go.
Try it out on Linux by installing the tun_tcp_echo demo:
go install github.com/google/netstack/tcpip/sample/tun_tcp_echo
Create a TUN device with:
[sudo] ip tuntap add user <username> mode tun <device-name> [sudo] ip link set <device-name> up [sudo] ip addr add <ipv4-address>/<mask-length> dev <device-name>
Then run with:
tun_tcp_echo <device-name> <ipv4-address> <port>
Please see CONTRIBUTING.md for more details.
Netstack is primarily developed as part of gVisor and any issues/bugs should be filed against the gVisor repository as this repo is not actively monitored for bug reports.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.