From fab4f0920cacff98e88a237afc422f6950d778ae Mon Sep 17 00:00:00 2001 From: Michael C Cambria Date: Thu, 31 Aug 2017 15:15:34 +0000 Subject: [PATCH] updated anycast plugin to current master --- plugins/anycast/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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. -- 2.44.0