mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
network: refuse to configure anything on pending or initialized state
This commit is contained in:
parent
53c2e3b9ba
commit
d8d4db58ca
@ -95,6 +95,9 @@ bool link_ipv6_enabled(Link *link) {
|
||||
bool link_is_ready_to_configure(Link *link, bool allow_unmanaged) {
|
||||
assert(link);
|
||||
|
||||
if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED, LINK_STATE_UNMANAGED))
|
||||
return false;
|
||||
|
||||
if (!link->network) {
|
||||
if (!allow_unmanaged)
|
||||
return false;
|
||||
@ -102,9 +105,6 @@ bool link_is_ready_to_configure(Link *link, bool allow_unmanaged) {
|
||||
return link_has_carrier(link);
|
||||
}
|
||||
|
||||
if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED))
|
||||
return false;
|
||||
|
||||
if (!link->network->configure_without_carrier) {
|
||||
if (link->set_flags_messages > 0)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user