mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
network: dhcp4: disable DHCPv4 client on interfaces with non-supported types
Replaces f42d41cc5f
.
This commit is contained in:
parent
8f4f630731
commit
7e2f684e1f
@ -52,6 +52,10 @@ bool link_dhcp_enabled(Link *link, int family) {
|
||||
assert(link);
|
||||
assert(IN_SET(family, AF_INET, AF_INET6));
|
||||
|
||||
/* Currently, sd-dhcp-client supports only ethernet and infiniband. */
|
||||
if (family == AF_INET && !IN_SET(link->iftype, ARPHRD_ETHER, ARPHRD_INFINIBAND))
|
||||
return false;
|
||||
|
||||
if (family == AF_INET6 && !socket_ipv6_is_supported())
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user