1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

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.
This commit is contained in:
Yu Watanabe 2021-06-22 04:11:15 +09:00
parent 89d8ed9932
commit a1e35fca46

View 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"))