ether-addr-util: make hw_addr_is_null() return true also for all zero address
This fixes the following error: --- systemd-networkd[1449490]: ip6tnl0: Saved hardware address: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 systemd-networkd[1449490]: ip6tnl0: Failed to manage link by its new hardware address, ignoring: File exists ---
This commit is contained in:
@@ -37,7 +37,8 @@ static inline bool hw_addr_equal(const struct hw_addr_data *a, const struct hw_a
|
||||
return hw_addr_compare(a, b) == 0;
|
||||
}
|
||||
static inline bool hw_addr_is_null(const struct hw_addr_data *addr) {
|
||||
return hw_addr_equal(addr, &HW_ADDR_NULL);
|
||||
assert(addr);
|
||||
return addr->length == 0 || memeqzero(addr->bytes, addr->length);
|
||||
}
|
||||
|
||||
extern const struct hash_ops hw_addr_hash_ops;
|
||||
|
||||
Reference in New Issue
Block a user