Move attach() and detach() from shell script to Go

This commit is contained in:
Bryan Boreham committed 2016-05-25 17:34:13 +01:00
1 parent e3ef473cd3
commit ac14b19db8
5 files changed
+155 -81

No files matched your search

+1 -1
View File
@@ -92,7 +92,7 @@ func (c *CNIPlugin) CmdAdd(args *skel.CmdArgs) error {
id = fmt.Sprintf("%x", data)
}
if err := weavenet.AttachContainer(ns, id, args.IfName, conf.BrName, conf.MTU, []*net.IPNet{&result.IP4.IP}); err != nil {
if err := weavenet.AttachContainer(ns, id, args.IfName, conf.BrName, conf.MTU, false, []*net.IPNet{&result.IP4.IP}); err != nil {
return err
}
if err := weavenet.WithNetNSLink(ns, args.IfName, func(guest netlink.Link) error {