diff options
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index a3b4d0f65..7dc4d34b9 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -132,6 +132,13 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data) // Set network namespace path data.NetworkSettings.SandboxKey = runtimeInfo.NetNS.Path() + + // Set MAC address of interface linked with network namespace path + for _, i := range c.state.Interfaces { + if i.Sandbox == data.NetworkSettings.SandboxKey { + data.NetworkSettings.MacAddress = i.Mac + } + } } if size { |