summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp-common.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-31 04:08:24 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-31 05:10:28 +0100
commitf42d41cc5f9cd8cac538a1c30fda04d346b5bae2 (patch)
treec63662b0e3eefe321d575d3666f223554e8cfefc /src/network/networkd-dhcp-common.c
parentbasic: update CIFS magic (diff)
downloadsystemd-f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.tar.xz
systemd-f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.zip
network: configure DHCP clients after MAC address is assigned
Prompted by #20090.
Diffstat (limited to 'src/network/networkd-dhcp-common.c')
-rw-r--r--src/network/networkd-dhcp-common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
index 7996960bd1..5331cdcead 100644
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -61,6 +61,13 @@ bool link_dhcp_enabled(Link *link, int family) {
if (link->iftype == ARPHRD_CAN)
return false;
+ if (!IN_SET(link->hw_addr.length, ETH_ALEN, INFINIBAND_ALEN) &&
+ !streq_ptr(link->kind, "wwan"))
+ /* Currently, only interfaces whose MAC address length is ETH_ALEN or INFINIBAND_ALEN
+ * are supported. Note, wwan interfaces may be assigned MAC address slightly later.
+ * Hence, let's wait for a while.*/
+ return false;
+
if (!link->network)
return false;