Commit Graph
3 Commits
Author SHA1 Message Date
Nicolas LacasseandgVisor bot e4f4a8bc8a Make hostinet get the interfaces/addr/routes dynamicallys.
Previously we were initializing these at startup and they could never change.
Now they are read dynamically every time they are requested. This is a
pre-requisite for implementing methods that mutate the interfaces
(stack.AddInterface()).

PiperOrigin-RevId: 522109098
2023-04-05 11:35:39 -07:00
Kevin KrakauerandgVisor bot c45a4738dc netstack: fallback to IPv4 when checking hostinet interface features
This enables hostinet to start on both IPv4-only and IPv6-only hosts.

Note that hostinet doesn't have a way to prevent applications inside gVisor
from trying to send, for example, IPv6 packets on an IPv4-only host. The result
of trying to do so is environment-dependent, but will likely fail during calls
to connect(), send(), and the like.

Fixes #8253.

PiperOrigin-RevId: 492579750
2022-12-02 15:58:01 -08:00
Bhasker HariharanandgVisor bot 4664e71ebb Support custom socket options in hostinet.
PiperOrigin-RevId: 416625574
2021-12-15 12:51:54 -08:00