From: Yu Watanabe Date: Mon, 21 Jun 2021 19:11:15 +0000 (+0900) Subject: network: ipv4ll: refuse to configure IPv4LL address on interface where the length... X-Git-Tag: v249-rc3~17^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1e35fca46681eab34608377b04d77f68128483a;p=thirdparty%2Fsystemd.git 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. --- 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"))