Browse Source

Merge pull request #469 from sanimej/ov-mac

Overlay driver should assign interface mac based on the IP
Jana Radhakrishnan 10 years ago
parent
commit
6b9d51cbe0
1 changed files with 1 additions and 1 deletions
  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 {