Fix NetworkInterface#getHardwareAddress corner case
NetworkInterface#getHardwareAddress was caching
the hardware address on its object creation. This is not
consistent with other NwtworkInterface methods
and will cause to return wrong value if address
changes or network device changes/goes away.
This change changes #getHardwareAddress to
recreate a NetworkInterface and fetch up-to-date
HW address (or throw an exception if there's no such address).
2 files changed