mirror of
https://github.com/systemd/systemd.git
synced 2025-08-26 17:49:52 +03:00
network: do not make link in configured state when no address is assigned
When DHCP6 and RA are enabled, and RA does not provide any addresses, then link may become configured state even if no address is assigned, due to the time-lag between RA completion and DHCP reply. This makes if DHCP is explicitly enabled, then link must have at least one valid address to be in the configured state.
This commit is contained in:
@ -1168,6 +1168,11 @@ void link_check_ready(Link *link) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link)) && set_isempty(link->addresses)) {
|
||||
log_link_debug(link, "%s(): DHCP4 or DHCP6 is enabled but no address is assigned yet.", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || dhcp6_get_prefix_delegation(link) || link_ipv6_accept_ra_enabled(link)) {
|
||||
if (!link->dhcp4_configured &&
|
||||
!(link->dhcp6_address_configured && link->dhcp6_route_configured) &&
|
||||
|
Reference in New Issue
Block a user