소스 검색

Default MAC address generation is not random and should be stated in the documentation.

Signed-off-by: Gianluca Borello <g.borello@gmail.com>
Gianluca Borello 10 년 전
부모
커밋
e324f51e5b
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      daemon/networkdriver/bridge/driver.go
  2. 3 3
      docs/sources/reference/run.md

+ 1 - 1
daemon/networkdriver/bridge/driver.go

@@ -608,7 +608,7 @@ func Allocate(id, requestedMac, requestedIP, requestedIPv6 string) (*network.Set
 		return nil, err
 		return nil, err
 	}
 	}
 
 
-	// If no explicit mac address was given, generate a random one.
+	// If no explicit mac address was given, generate one from the IP address.
 	if mac, err = net.ParseMAC(requestedMac); err != nil {
 	if mac, err = net.ParseMAC(requestedMac); err != nil {
 		mac = generateMacAddr(ip)
 		mac = generateMacAddr(ip)
 	}
 	}

+ 3 - 3
docs/sources/reference/run.md

@@ -216,9 +216,9 @@ networking. In cases like this, you would perform I/O through files or
 Your container will use the same DNS servers as the host by default, but
 Your container will use the same DNS servers as the host by default, but
 you can override this with `--dns`.
 you can override this with `--dns`.
 
 
-By default a random MAC is generated. You can set the container's MAC address
-explicitly by providing a MAC via the `--mac-address` parameter (format:
-`12:34:56:78:9a:bc`).
+By default, the MAC address is generated using the IP address allocated to the
+container. You can set the container's MAC address explicitly by providing a
+MAC address via the `--mac-address` parameter (format:`12:34:56:78:9a:bc`).
 
 
 Supported networking modes are:
 Supported networking modes are: