dependencies: update netns to v0.0.4
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
This commit is contained in:
parent
d060d487dc
commit
6320b6843a
2
go.mod
2
go.mod
@ -213,7 +213,7 @@ require (
|
||||
github.com/stoewer/go-strcase v1.2.0 // indirect
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect
|
||||
github.com/vishvananda/netns v0.0.2 // indirect
|
||||
github.com/vishvananda/netns v0.0.4 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
github.com/xlab/treeprint v1.1.0 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
|
5
go.sum
5
go.sum
@ -673,8 +673,8 @@ github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
|
||||
github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=
|
||||
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
|
||||
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
|
||||
github.com/vishvananda/netns v0.0.2 h1:Cn05BRLm+iRP/DZxyVSsfVyrzgjDbwHwkVt38qvXnNI=
|
||||
github.com/vishvananda/netns v0.0.2/go.mod h1:yitZXdAVI+yPFSb4QUe+VW3vOVl4PZPNcBgbPxAtJxw=
|
||||
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
||||
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/vmware/govmomi v0.30.0 h1:Fm8ugPnnlMSTSceDKY9goGvjmqc6eQLPUSUeNXdpeXA=
|
||||
github.com/vmware/govmomi v0.30.0/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||
@ -963,7 +963,6 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
|
2
vendor/github.com/vishvananda/netns/.golangci.yml
generated
vendored
Normal file
2
vendor/github.com/vishvananda/netns/.golangci.yml
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
run:
|
||||
timeout: 5m
|
11
vendor/github.com/vishvananda/netns/README.md
generated
vendored
11
vendor/github.com/vishvananda/netns/README.md
generated
vendored
@ -49,14 +49,3 @@ func main() {
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## NOTE
|
||||
|
||||
The library can be safely used only with Go >= 1.10 due to [golang/go#20676](https://github.com/golang/go/issues/20676).
|
||||
|
||||
After locking a goroutine to its current OS thread with `runtime.LockOSThread()`
|
||||
and changing its network namespace, any new subsequent goroutine won't be
|
||||
scheduled on that thread while it's locked. Therefore, the new goroutine
|
||||
will run in a different namespace leading to unexpected results.
|
||||
|
||||
See [here](https://www.weave.works/blog/linux-namespaces-golang-followup) for more details.
|
||||
|
9
vendor/github.com/vishvananda/netns/netns_linux.go
generated
vendored
9
vendor/github.com/vishvananda/netns/netns_linux.go
generated
vendored
@ -2,7 +2,6 @@ package netns
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
@ -136,7 +135,7 @@ func GetFromDocker(id string) (NsHandle, error) {
|
||||
|
||||
// borrowed from docker/utils/utils.go
|
||||
func findCgroupMountpoint(cgroupType string) (int, string, error) {
|
||||
output, err := ioutil.ReadFile("/proc/mounts")
|
||||
output, err := os.ReadFile("/proc/mounts")
|
||||
if err != nil {
|
||||
return -1, "", err
|
||||
}
|
||||
@ -166,7 +165,7 @@ func findCgroupMountpoint(cgroupType string) (int, string, error) {
|
||||
// borrowed from docker/utils/utils.go
|
||||
// modified to get the docker pid instead of using /proc/self
|
||||
func getDockerCgroup(cgroupVer int, cgroupType string) (string, error) {
|
||||
dockerpid, err := ioutil.ReadFile("/var/run/docker.pid")
|
||||
dockerpid, err := os.ReadFile("/var/run/docker.pid")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -178,7 +177,7 @@ func getDockerCgroup(cgroupVer int, cgroupType string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
output, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
|
||||
output, err := os.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -265,7 +264,7 @@ func getPidForContainer(id string) (int, error) {
|
||||
return pid, fmt.Errorf("Unable to find container: %v", id[:len(id)-1])
|
||||
}
|
||||
|
||||
output, err := ioutil.ReadFile(filename)
|
||||
output, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return pid, err
|
||||
}
|
||||
|
2
vendor/github.com/vishvananda/netns/nshandle_linux.go
generated
vendored
2
vendor/github.com/vishvananda/netns/nshandle_linux.go
generated
vendored
@ -30,7 +30,7 @@ func (ns NsHandle) Equal(other NsHandle) bool {
|
||||
// String shows the file descriptor number and its dev and inode.
|
||||
func (ns NsHandle) String() string {
|
||||
if ns == -1 {
|
||||
return "NS(None)"
|
||||
return "NS(none)"
|
||||
}
|
||||
var s unix.Stat_t
|
||||
if err := unix.Fstat(int(ns), &s); err != nil {
|
||||
|
2
vendor/github.com/vishvananda/netns/nshandle_others.go
generated
vendored
2
vendor/github.com/vishvananda/netns/nshandle_others.go
generated
vendored
@ -17,7 +17,7 @@ func (ns NsHandle) Equal(_ NsHandle) bool {
|
||||
// It is only implemented on Linux, and returns "NS(none)" on other
|
||||
// platforms.
|
||||
func (ns NsHandle) String() string {
|
||||
return "NS(None)"
|
||||
return "NS(none)"
|
||||
}
|
||||
|
||||
// UniqueId returns a string which uniquely identifies the namespace
|
||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@ -664,8 +664,8 @@ github.com/tmc/grpc-websocket-proxy/wsproxy
|
||||
## explicit; go 1.12
|
||||
github.com/vishvananda/netlink
|
||||
github.com/vishvananda/netlink/nl
|
||||
# github.com/vishvananda/netns v0.0.2
|
||||
## explicit; go 1.12
|
||||
# github.com/vishvananda/netns v0.0.4
|
||||
## explicit; go 1.17
|
||||
github.com/vishvananda/netns
|
||||
# github.com/vmware/govmomi v0.30.0
|
||||
## explicit; go 1.17
|
||||
|
Loading…
Reference in New Issue
Block a user