Detect and return permanent MAC address of interfaces
Turrrishw determines MAC address of interface from /sys/class/net/<interface>
.
Which means that we are able to return currently used MAC address, but unable tell whether such MAC address is original or overridden/spoofed.
It would be handy to also return original MAC addresses alongside currently used one.
Mox
root@mox:~# mox-otp mac
<wan mac>
mox-otp
will get only first mac. To get the second one, add +1 to mac address.
Omnia
root@omnia:/# atsha204cmd mac 3
<switch1 mac>
<wan mac>
<switch2 mac>
Turris 1.x
root@turris:~# atsha204cmd mac 3
<switch 1 mac>
<switch 2 mac>
<wan mac>
⚠ WarningIt would be safer to fetch mac from atshacmd at boot, instead of fetching on demand. Because every wakeup of ATSHA204A chip also shortens its lifespan.