From c9c7c12440213d648342880bafa4778da8401e84 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 11 Feb 2021 15:09:00 +1100 Subject: [PATCH] agent: Remove bogus check from list_interfaces() unit test The unit test for list_interfaces() checks that the hardware address returned for each interface has non-zero length. However, that need not be the case. Point-to-point devices, such as ppp, or tun devices in certain configurations may not have a hardware address, which is represented as a zero length address here. This happens on my machine with a tun0 device created by OpenVPN. fixes #1377 Signed-off-by: David Gibson --- src/agent/src/netlink.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/agent/src/netlink.rs b/src/agent/src/netlink.rs index b0500be635..fe0db72963 100644 --- a/src/agent/src/netlink.rs +++ b/src/agent/src/netlink.rs @@ -873,7 +873,6 @@ mod tests { for iface in &list { assert_ne!(iface.name.len(), 0); - assert_ne!(iface.hwAddr.len(), 0); assert_ne!(iface.mtu, 0); for ip in &iface.IPAddresses {