Skip to content

Commit

Permalink
Chain interface to other CNI plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
theMagicalKarp authored and mogren committed Jun 27, 2020
1 parent 30f98bd commit 6d35fda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/routed-eni-cni-plugin/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,20 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap
return errors.Wrap(err, "add command: failed to setup network")
}

interfaceIndex := 0
ips := []*current.IPConfig{
{
Version: "4",
Address: *addr,
Version: "4",
Address: *addr,
Interface: &interfaceIndex,
},
}

result := &current.Result{
IPs: ips,
Interfaces: []*current.Interface{
&current.Interface{Name: hostVethName},
},
}

return cniTypes.PrintResult(result, conf.CNIVersion)
Expand Down

0 comments on commit 6d35fda

Please sign in to comment.