소스 검색

Merge pull request #469 from sanimej/ov-mac

Overlay driver should assign interface mac based on the IP
Jana Radhakrishnan 10 년 전
부모
커밋
6b9d51cbe0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 {