summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-06-17 17:40:39 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-18 14:20:30 +0000
commit4d3db1b4a9ec1a1a2aa74e3da0102b6017f8a328 (patch)
tree69bf2c39b3e204f27230f97684315dfb5264973b /libpod/container_inspect.go
parentfc81dd71feef94cc754485ee2a38444eb67c4d8c (diff)
downloadpodman-4d3db1b4a9ec1a1a2aa74e3da0102b6017f8a328.tar.gz
podman-4d3db1b4a9ec1a1a2aa74e3da0102b6017f8a328.tar.bz2
podman-4d3db1b4a9ec1a1a2aa74e3da0102b6017f8a328.zip
Add MacAddress to inspect
Signed-off-by: Wim <wim@42.be> Closes: #955 Approved by: rhatdan
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go7
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 {