summaryrefslogtreecommitdiff
path: root/vendor/github.com/vishvananda/netns
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-08-01 03:41:27 -0400
committerGitHub <noreply@github.com>2019-08-01 03:41:27 -0400
commit39de184b8bfb14954f77190f0e6127c1ddc363c0 (patch)
treeeb76e980bc7d8c7b64e93a2cf6293c0e073db860 /vendor/github.com/vishvananda/netns
parenta622f8d345b1853401de2e533e9fbf14ef169fa2 (diff)
parent141c7a5165261b0a75254107b63b2dac22203ebf (diff)
downloadpodman-39de184b8bfb14954f77190f0e6127c1ddc363c0.tar.gz
podman-39de184b8bfb14954f77190f0e6127c1ddc363c0.tar.bz2
podman-39de184b8bfb14954f77190f0e6127c1ddc363c0.zip
Merge pull request #3573 from rhatdan/vendor
Vendor in latest buildah code
Diffstat (limited to 'vendor/github.com/vishvananda/netns')
-rw-r--r--vendor/github.com/vishvananda/netns/README.md1
-rw-r--r--vendor/github.com/vishvananda/netns/netns_linux.go5
2 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/vishvananda/netns/README.md b/vendor/github.com/vishvananda/netns/README.md
index 66a5f7258..6b45cfb89 100644
--- a/vendor/github.com/vishvananda/netns/README.md
+++ b/vendor/github.com/vishvananda/netns/README.md
@@ -37,7 +37,6 @@ func main() {
// Create a new network namespace
newns, _ := netns.New()
- netns.Set(newns)
defer newns.Close()
// Do something with the network namespace
diff --git a/vendor/github.com/vishvananda/netns/netns_linux.go b/vendor/github.com/vishvananda/netns/netns_linux.go
index e665ef449..b1e3b07c0 100644
--- a/vendor/github.com/vishvananda/netns/netns_linux.go
+++ b/vendor/github.com/vishvananda/netns/netns_linux.go
@@ -21,8 +21,10 @@ var SYS_SETNS = map[string]uintptr{
"arm": 375,
"mips": 4344,
"mipsle": 4344,
+ "mips64le": 4344,
"ppc64": 350,
"ppc64le": 350,
+ "riscv64": 268,
"s390x": 339,
}[runtime.GOARCH]
@@ -52,7 +54,8 @@ func Set(ns NsHandle) (err error) {
return Setns(ns, CLONE_NEWNET)
}
-// New creates a new network namespace and returns a handle to it.
+// New creates a new network namespace, sets it as current and returns
+// a handle to it.
func New() (ns NsHandle, err error) {
if err := syscall.Unshare(CLONE_NEWNET); err != nil {
return -1, err