ifdata: fail when -ph is given but no hwaddr is available (Closes: #386755)
commitbeb43483d0a312051a1bfa60b0d50983cf01421e
authorNicolas Schier <nicolas@fjasle.eu>
Tue, 27 Oct 2020 20:23:44 +0000 (27 21:23 +0100)
committerJoey Hess <joeyh@joeyh.name>
Sat, 2 Jan 2021 16:23:36 +0000 (2 12:23 -0400)
tree9987bfb012e8919a7864e9db425ba9aca6f0cb4f
parent83b0a23a8e68d326bbc96fef9174d8c188385868
ifdata: fail when -ph is given but no hwaddr is available (Closes: #386755)

Exit ifdata with an error code if '-ph' (print hardware address) is
given but no hardware address is available for the given network device.
Previously, ifdata printed the invalid hardware address
00:00:00:00:00:00 in such cases and exited as if this was the real
hardware address.

Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
ifdata.c
ifdata.docbook