mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11427 from LK4D4/fix_alloc_ip6
Fix IPv6 autoallocation from mac with --ipv6-cidr
This commit is contained in:
commit
213be9ee27
1 changed files with 2 additions and 1 deletions
|
@ -523,7 +523,8 @@ func Allocate(job *engine.Job) engine.Status {
|
|||
// If globalIPv6Network Size is at least a /80 subnet generate IPv6 address from MAC address
|
||||
netmask_ones, _ := globalIPv6Network.Mask.Size()
|
||||
if requestedIPv6 == nil && netmask_ones <= 80 {
|
||||
requestedIPv6 = globalIPv6Network.IP
|
||||
requestedIPv6 = make(net.IP, len(globalIPv6Network.IP))
|
||||
copy(requestedIPv6, globalIPv6Network.IP)
|
||||
for i, h := range mac {
|
||||
requestedIPv6[i+10] = h
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue