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:
parent
89d8ed9932
commit
a1e35fca46
@ -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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user