plugins: update to spec version 1.0.0

Signed-off-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
Dan Williams
2020-09-30 10:40:15 -05:00
parent 9e2430bb80
commit 7d8c767622
53 changed files with 350 additions and 373 deletions

View File

@ -26,7 +26,7 @@ import (
"github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/current"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/version"
"github.com/containernetworking/plugins/pkg/ip"
@ -269,7 +269,10 @@ func cmdAdd(args *skel.CmdArgs) error {
}()
// Assume L2 interface only
result := &current.Result{CNIVersion: cniVersion, Interfaces: []*current.Interface{macvlanInterface}}
result := &current.Result{
CNIVersion: current.ImplementedSpecVersion,
Interfaces: []*current.Interface{macvlanInterface},
}
if isLayer3 {
// run the IPAM plugin and get back the config to apply
@ -314,7 +317,7 @@ func cmdAdd(args *skel.CmdArgs) error {
}
for _, ipc := range result.IPs {
if ipc.Version == "4" {
if ipc.Address.IP.To4() != nil {
_ = arping.GratuitousArpOverIface(ipc.Address.IP, *contVeth)
}
}