plugins: update to spec version 1.0.0
Signed-off-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
@ -27,7 +27,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"
|
||||
@ -108,7 +108,7 @@ func setupContainerVeth(netns ns.NetNS, ifName string, mtu int, pr *current.Resu
|
||||
}
|
||||
|
||||
addrBits := 32
|
||||
if ipc.Version == "6" {
|
||||
if ipc.Address.IP.To4() == nil {
|
||||
addrBits = 128
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ func setupContainerVeth(netns ns.NetNS, ifName string, mtu int, pr *current.Resu
|
||||
|
||||
// Send a gratuitous arp for all v4 addresses
|
||||
for _, ipc := range pr.IPs {
|
||||
if ipc.Version == "4" {
|
||||
if ipc.Address.IP.To4() != nil {
|
||||
_ = arping.GratuitousArpOverIface(ipc.Address.IP, *contVeth)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user