The address.mac function doesn't return the mac address of the iface if it doesn't have an ip address.
I only test it under linux, but i can see in the source code the getMAC function uses the ip address of the interface to match the interface.
I don't really understand why this check is done since multiple interface can't have the same name.
What happens if an interface have secondaries ip address ?
ifconfig IFACE or ip link show IFACE returns the configuration of the named interface only.
The address.mac function doesn't return the mac address of the iface if it doesn't have an ip address.
I only test it under linux, but i can see in the source code the getMAC function uses the ip address of the interface to match the interface. I don't really understand why this check is done since multiple interface can't have the same name. What happens if an interface have secondaries ip address ? ifconfig IFACE or ip link show IFACE returns the configuration of the named interface only.