mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-29 21:47:05 +03:00
network: dhcp4: disable DHCPv4 client on interfaces with non-supported types
Replaces f42d41cc5f9cd8cac538a1c30fda04d346b5bae2. (cherry picked from commit 7e2f684e1fa391bd511b52bbbe4a3971cdc5ec33) (cherry picked from commit 9951ea07d5a9a43b3a4c8225f1b79f446e62eebe)
This commit is contained in:
parent
b9216947a3
commit
89a5b7752f
@ -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…
x
Reference in New Issue
Block a user