mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
And enable all of the netlink tests that depend on this functionality. Specifially, this CL implements hostinet.stack: * .RemoveInterface() * .AddInterfaceAddr() * .RemoveInterfaceAddr() Applications use netlink messages to call into these methods. For hostinet, we use netlink messages to the host to implement these methods. Note that the netlink messages are not simple passed from the application to the host -- they are parsed first and only carefully crafted messages are sent to the host. This CL required a lot of refactoring to the existing netlink code in the hostinet package, as well as a bunch of new functionality. All of that code has been collected in hostinet/netlink.go I also changed how we handle CAP_NET_ADMIN and CAP_NET_RAW in tests, since we must drop those capabilities inside the sandbox if we don't have them on the host. The new solution is cleaner and does not rely on google-specific env variables. PiperOrigin-RevId: 522685544