]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: ipv4ll: refuse to configure IPv4LL address on interface where the length...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 21 Jun 2021 19:11:15 +0000 (04:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 30 Jun 2021 15:49:02 +0000 (00:49 +0900)
Currently, sd-ipv4acd assumes hardware address is ETH_ALEN.

src/network/networkd-link.c

index 378420d9d3e09d7493e9374964f6f86bc2288e32..ba1bd283df797d6c93b36550f26065a856e289ca 100644 (file)
@@ -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"))