From a1e35fca46681eab34608377b04d77f68128483a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 22 Jun 2021 04:11:15 +0900 Subject: [PATCH] network: ipv4ll: refuse to configure IPv4LL address on interface where the length of the hardware address is not ETH_ALEN Currently, sd-ipv4acd assumes hardware address is ETH_ALEN. --- src/network/networkd-link.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 378420d9d3e..ba1bd283df7 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -74,6 +74,12 @@ bool link_ipv4ll_enabled(Link *link) { if (link->iftype == ARPHRD_CAN) return false; + if (link->hw_addr.length != ETH_ALEN) + return false; + + if (ether_addr_is_null(&link->hw_addr.ether)) + return false; + if (STRPTR_IN_SET(link->kind, "vrf", "wireguard", "ipip", "gre", "ip6gre","ip6tnl", "sit", "vti", "vti6", "nlmon", "xfrm", "bareudp")) -- 2.47.3