mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ipvlan slaves must inherit the mac-address from parent
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
f068f57e03
commit
60bd944921
1 changed files with 0 additions and 7 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libnetwork/driverapi"
|
||||
"github.com/docker/libnetwork/netlabel"
|
||||
"github.com/docker/libnetwork/netutils"
|
||||
"github.com/docker/libnetwork/osl"
|
||||
"github.com/docker/libnetwork/types"
|
||||
"github.com/vishvananda/netlink"
|
||||
|
@ -36,12 +35,6 @@ func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo,
|
|||
if ep.addr == nil {
|
||||
return fmt.Errorf("create endpoint was not passed an IP address")
|
||||
}
|
||||
if ep.mac == nil {
|
||||
ep.mac = netutils.GenerateMACFromIP(ep.addr.IP)
|
||||
if err := ifInfo.SetMacAddress(ep.mac); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
// disallow port mapping -p
|
||||
if opt, ok := epOptions[netlabel.PortMap]; ok {
|
||||
if _, ok := opt.([]types.PortBinding); ok {
|
||||
|
|
Loading…
Reference in a new issue