Include interface name in container-addrs output

This commit is contained in:
Adam Harrison committed 2016-05-06 14:12:50 +01:00
1 parent ad5845b67f
commit 260b416cd7
3 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ func containerAddrs(args []string) error {
}
for _, netDev := range netDevs {
fmt.Printf("%12s %s", containerID, netDev.MAC.String())
fmt.Printf("%12s %s %s", containerID, netDev.Name, netDev.MAC.String())
for _, cidr := range netDev.CIDRs {
prefixLength, _ := cidr.Mask.Size()
fmt.Printf(" %v/%v", cidr.IP, prefixLength)