1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Added mac address to EndpointInfo

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
Jana Radhakrishnan 2015-05-05 03:27:34 +00:00
parent 560d156e36
commit a983569c0c

View file

@ -61,6 +61,7 @@ type ContainerConfiguration struct {
type bridgeEndpoint struct {
id types.UUID
intf *sandbox.Interface
macAddress net.HardwareAddr
config *EndpointConfiguration // User specified parameters
portMapping []netutils.PortBinding // Operation port bindings
}
@ -424,6 +425,7 @@ func (d *driver) CreateEndpoint(nid, eid types.UUID, epOptions map[string]interf
if err != nil {
return nil, err
}
endpoint.macAddress = mac
// Add bridge inherited attributes to pipe interfaces
if config.Mtu != 0 {
@ -614,6 +616,10 @@ func (d *driver) EndpointInfo(nid, eid types.UUID) (map[string]interface{}, erro
m[options.PortMap] = pmc
}
if len(ep.macAddress) != 0 {
m[options.MacAddress] = ep.macAddress
}
return m, nil
}