Merge pull request #755 from aboch/mc
libnetwork to honor explicit mac-address for all drivers
This commit is contained in:
commit
e7b0344efe
1 changed files with 6 additions and 0 deletions
|
@ -671,6 +671,12 @@ func (n *network) CreateEndpoint(name string, options ...EndpointOption) (Endpoi
|
|||
|
||||
ep.processOptions(options...)
|
||||
|
||||
if opt, ok := ep.generic[netlabel.MacAddress]; ok {
|
||||
if mac, ok := opt.(net.HardwareAddr); ok {
|
||||
ep.iface.mac = mac
|
||||
}
|
||||
}
|
||||
|
||||
if err = ep.assignAddress(true, !n.postIPv6); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue