mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
network: delay to configure address until it is removed on reconfigure
When we request an address that already exists and is under removing, we need to wait for the address being removed. Otherwise, configuration of a route whose preferred source is the address will fail. Fixes #28009. Replaces #28088.
This commit is contained in:
@@ -1158,6 +1158,9 @@ static bool address_is_ready_to_configure(Link *link, const Address *address) {
|
||||
if (!link_is_ready_to_configure(link, false))
|
||||
return false;
|
||||
|
||||
if (address_is_removing(address))
|
||||
return false;
|
||||
|
||||
if (!ipv4acd_bound(address))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -125,6 +125,10 @@ int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);
|
||||
NETWORK_CONFIG_STATE_REMOVING, \
|
||||
NETWORK_CONFIG_STATE_REMOVING); \
|
||||
} \
|
||||
static inline bool name##_is_removing(const type *t) { \
|
||||
assert(t); \
|
||||
return FLAGS_SET(t->state, NETWORK_CONFIG_STATE_REMOVING); \
|
||||
} \
|
||||
static inline void name##_enter_removed(type *t) { \
|
||||
name##_update_state(t, \
|
||||
NETWORK_CONFIG_STATE_CONFIGURED | \
|
||||
|
||||
Reference in New Issue
Block a user