From: Michael C Cambria Date: Thu, 31 Aug 2017 15:15:34 +0000 (+0000) Subject: updated anycast plugin to current master X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=fab4f0920cacff98e88a237afc422f6950d778ae;p=plugins.git updated anycast plugin to current master --- diff --git a/plugins/anycast/main.go b/plugins/anycast/main.go index 01f8f8d..3fe560f 100644 --- a/plugins/anycast/main.go +++ b/plugins/anycast/main.go @@ -26,7 +26,7 @@ import ( "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/cni/pkg/version" - "github.com/containernetworking/cni/pkg/ns" + "github.com/containernetworking/plugins/pkg/ns" "github.com/vishvananda/netlink" "log" "os" @@ -117,7 +117,10 @@ func cmdAdd(args *skel.CmdArgs) error { } } else { for _, ip := range conf.PrevResult.IPs { - intIdx := ip.Interface + if ip.Interface == nil { + continue + } + intIdx := *ip.Interface // Every IP is indexed in to the interfaces array, with "-1" standing // for an unknown interface (which we'll assume to be Container-side // Skip all IPs we know belong to an interface with the wrong name.