mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-12 09:17:44 +03:00
network: apply activation policy only when it is once activated
Otherwise, e.g., if activation policy is always-up is set for bond slave, then setting bond configuration may fail.
This commit is contained in:
parent
da4929eeb9
commit
899b0e5eec
@ -1567,7 +1567,7 @@ static int link_admin_state_up(Link *link) {
|
||||
if (!link->network)
|
||||
return 0;
|
||||
|
||||
if (link->network->activation_policy == ACTIVATION_POLICY_ALWAYS_DOWN) {
|
||||
if (link->activated && link->network->activation_policy == ACTIVATION_POLICY_ALWAYS_DOWN) {
|
||||
log_link_info(link, "ActivationPolicy is \"always-off\", forcing link down");
|
||||
return link_down(link);
|
||||
}
|
||||
@ -1587,7 +1587,7 @@ static int link_admin_state_down(Link *link) {
|
||||
if (!link->network)
|
||||
return 0;
|
||||
|
||||
if (link->network->activation_policy == ACTIVATION_POLICY_ALWAYS_UP) {
|
||||
if (link->activated && link->network->activation_policy == ACTIVATION_POLICY_ALWAYS_UP) {
|
||||
log_link_info(link, "ActivationPolicy is \"always-on\", forcing link up");
|
||||
return link_up(link);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user