summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containernetworking/cni/libcni/conf.go6
-rw-r--r--vendor/github.com/containernetworking/cni/pkg/version/plugin.go4
-rw-r--r--vendor/modules.txt2
3 files changed, 7 insertions, 5 deletions
diff --git a/vendor/github.com/containernetworking/cni/libcni/conf.go b/vendor/github.com/containernetworking/cni/libcni/conf.go
index d28135ff3..3cd6a59d1 100644
--- a/vendor/github.com/containernetworking/cni/libcni/conf.go
+++ b/vendor/github.com/containernetworking/cni/libcni/conf.go
@@ -21,6 +21,8 @@ import (
"os"
"path/filepath"
"sort"
+
+ "github.com/containernetworking/cni/pkg/types"
)
type NotFoundError struct {
@@ -41,8 +43,8 @@ func (e NoConfigsFoundError) Error() string {
}
func ConfFromBytes(bytes []byte) (*NetworkConfig, error) {
- conf := &NetworkConfig{Bytes: bytes}
- if err := json.Unmarshal(bytes, &conf.Network); err != nil {
+ conf := &NetworkConfig{Bytes: bytes, Network: &types.NetConf{}}
+ if err := json.Unmarshal(bytes, conf.Network); err != nil {
return nil, fmt.Errorf("error parsing configuration: %w", err)
}
if conf.Network.Type == "" {
diff --git a/vendor/github.com/containernetworking/cni/pkg/version/plugin.go b/vendor/github.com/containernetworking/cni/pkg/version/plugin.go
index d4bc9d169..17b22b6b0 100644
--- a/vendor/github.com/containernetworking/cni/pkg/version/plugin.go
+++ b/vendor/github.com/containernetworking/cni/pkg/version/plugin.go
@@ -86,8 +86,8 @@ func (*PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) {
// minor, and micro numbers or returns an error
func ParseVersion(version string) (int, int, int, error) {
var major, minor, micro int
- if version == "" {
- return -1, -1, -1, fmt.Errorf("invalid version %q: the version is empty", version)
+ if version == "" { // special case: no version declared == v0.1.0
+ return 0, 1, 0, nil
}
parts := strings.Split(version, ".")
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9837b3e61..bbee8a7fb 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -72,7 +72,7 @@ github.com/containerd/containerd/sys
# github.com/containerd/stargz-snapshotter/estargz v0.11.4
github.com/containerd/stargz-snapshotter/estargz
github.com/containerd/stargz-snapshotter/estargz/errorutil
-# github.com/containernetworking/cni v1.0.1
+# github.com/containernetworking/cni v1.1.0
## explicit
github.com/containernetworking/cni/libcni
github.com/containernetworking/cni/pkg/invoke