network: start dynamic addressing clients like DHCP after setting netdevs

The function link_acquire_conf() may make the link state 'configuring'
when DHCP6 PD is enabled. Previously link_acquire_conf() was called
before link_enter_join_netdev(), and thus the assertion in the function
might be triggered.

Fixes #17329.
This commit is contained in:
Yu Watanabe 2020-10-13 16:47:10 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent a748b122be
commit 0e569a439a
1 changed files with 5 additions and 6 deletions

View File

@ -1758,6 +1758,11 @@ static int link_joined(Link *link) {
return 0;
link_set_state(link, LINK_STATE_CONFIGURING);
r = link_acquire_conf(link);
if (r < 0)
return r;
return link_set_static_configs(link);
}
@ -2038,12 +2043,6 @@ static int link_configure_continue(Link *link) {
if (r < 0)
log_link_warning_errno(link, r, "Cannot set IPv6 MTU for interface, ignoring: %m");
if (link_has_carrier(link) || link->network->configure_without_carrier) {
r = link_acquire_conf(link);
if (r < 0)
return r;
}
return link_enter_join_netdev(link);
}