Overlay driver should assign interface mac based on the IP
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
7f15aee70e
commit
e4853a4ada
|
@ -73,7 +73,7 @@ func (d *driver) CreateEndpoint(nid, eid types.UUID, epInfo driverapi.EndpointIn
|
||||||
|
|
||||||
binary.BigEndian.PutUint32(ep.addr.IP, bridgeSubnetInt+ipID)
|
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{})
|
err = epInfo.AddInterface(1, ep.mac, *ep.addr, net.IPNet{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue