Explorar o código

Merge pull request #469 from sanimej/ov-mac

Overlay driver should assign interface mac based on the IP
Jana Radhakrishnan %!s(int64=10) %!d(string=hai) anos
pai
achega
6b9d51cbe0
Modificáronse 1 ficheiros con 1 adicións e 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 {