diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-31 12:08:24 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-31 13:10:28 +0900 |
commit | f42d41cc5f9cd8cac538a1c30fda04d346b5bae2 (patch) | |
tree | c63662b0e3eefe321d575d3666f223554e8cfefc /src/network/networkd-dhcp4.c | |
parent | bbe53713455be38c0a587626439fd171f28c77fc (diff) | |
download | systemd-f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.tar.gz |
network: configure DHCP clients after MAC address is assigned
Prompted by #20090.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index cb9c428ae9..718ac62f8e 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -1607,6 +1607,11 @@ int request_process_dhcp4_client(Request *req) { if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) return 0; + if (!IN_SET(link->hw_addr.length, ETH_ALEN, INFINIBAND_ALEN) || + hw_addr_is_null(&link->hw_addr)) + /* No MAC address is assigned to the hardware, or non-supported MAC address length. */ + return 0; + r = dhcp4_configure_duid(link); if (r <= 0) return r; |