mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
Revert "network: configure DHCP clients after MAC address is assigned"
This reverts commit f42d41cc5f
.
DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.
Partially fixes #23546.
This commit is contained in:
parent
b0e5bf0451
commit
8f4f630731
@ -61,13 +61,6 @@ 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;
|
||||
|
||||
|
@ -1545,11 +1545,6 @@ static int dhcp4_process_request(Request *req, Link *link, void *userdata) {
|
||||
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;
|
||||
|
@ -738,11 +738,6 @@ static int dhcp6_process_request(Request *req, Link *link, void *userdata) {
|
||||
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 = dhcp_configure_duid(link, link_get_dhcp6_duid(link));
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user