linuxkit/pkg/init/vendor/github.com/vishvananda/netns/doc.go
Avi Deitcher 1fe9d0ea76 bump pkg/init containerd, runc and image-spec to fix CVEs
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 10:55:01 +03:00

10 lines
544 B
Go
Vendored

// Package netns allows ultra-simple network namespace handling. NsHandles
// can be retrieved and set. Note that the current namespace is thread
// local so actions that set and reset namespaces should use LockOSThread
// to make sure the namespace doesn't change due to a goroutine switch.
// It is best to close NsHandles when you are done with them. This can be
// accomplished via a `defer ns.Close()` on the handle. Changing namespaces
// requires elevated privileges, so in most cases this code needs to be run
// as root.
package netns