소스 검색

Overlay driver should assign interface mac based on the IP

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Santhosh Manohar 10 년 전
부모
커밋
e4853a4ada
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 {