Kaynağa Gözat

Merge pull request #1007 from mavenugo/ipv

ipvlan slaves must inherit the mac-address from parent
Santhosh Manohar 9 yıl önce
ebeveyn
işleme
5cb343717a

+ 0 - 7
libnetwork/drivers/ipvlan/ipvlan_endpoint.go

@@ -6,7 +6,6 @@ import (
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/libnetwork/driverapi"
 	"github.com/docker/libnetwork/driverapi"
 	"github.com/docker/libnetwork/netlabel"
 	"github.com/docker/libnetwork/netlabel"
-	"github.com/docker/libnetwork/netutils"
 	"github.com/docker/libnetwork/osl"
 	"github.com/docker/libnetwork/osl"
 	"github.com/docker/libnetwork/types"
 	"github.com/docker/libnetwork/types"
 	"github.com/vishvananda/netlink"
 	"github.com/vishvananda/netlink"
@@ -36,12 +35,6 @@ func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo,
 	if ep.addr == nil {
 	if ep.addr == nil {
 		return fmt.Errorf("create endpoint was not passed an IP address")
 		return fmt.Errorf("create endpoint was not passed an IP address")
 	}
 	}
-	if ep.mac == nil {
-		ep.mac = netutils.GenerateMACFromIP(ep.addr.IP)
-		if err := ifInfo.SetMacAddress(ep.mac); err != nil {
-			return err
-		}
-	}
 	// disallow port mapping -p
 	// disallow port mapping -p
 	if opt, ok := epOptions[netlabel.PortMap]; ok {
 	if opt, ok := epOptions[netlabel.PortMap]; ok {
 		if _, ok := opt.([]types.PortBinding); ok {
 		if _, ok := opt.([]types.PortBinding); ok {