Explorar el Código

Overlay driver should assign interface mac based on the IP

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Santhosh Manohar hace 10 años
padre
commit
e4853a4ada
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      libnetwork/drivers/overlay/ov_endpoint.go

+ 1 - 1
libnetwork/drivers/overlay/ov_endpoint.go

@@ -73,7 +73,7 @@ func (d *driver) CreateEndpoint(nid, eid types.UUID, epInfo driverapi.EndpointIn
 
 	binary.BigEndian.PutUint32(ep.addr.IP, bridgeSubnetInt+ipID)
 
-	ep.mac = netutils.GenerateRandomMAC()
+	ep.mac = netutils.GenerateMACFromIP(ep.addr.IP)
 
 	err = epInfo.AddInterface(1, ep.mac, *ep.addr, net.IPNet{})
 	if err != nil {