pkg/ip: SetupVeth returns net.Interface

This commit is contained in:
Gabe Rosenhouse
2017-03-10 09:49:46 -08:00
parent 58c834c4f3
commit e4a0583d7a
4 changed files with 29 additions and 41 deletions

View File

@ -168,10 +168,10 @@ func setupVeth(netns ns.NetNS, br *netlink.Bridge, ifName string, mtu int, hairp
if err != nil {
return err
}
contIface.Name = containerVeth.Attrs().Name
contIface.Mac = containerVeth.Attrs().HardwareAddr.String()
contIface.Name = containerVeth.Name
contIface.Mac = containerVeth.HardwareAddr.String()
contIface.Sandbox = netns.Path()
hostIface.Name = hostVeth.Attrs().Name
hostIface.Name = hostVeth.Name
return nil
})
if err != nil {