diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-07-03 08:43:53 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-07-03 09:06:17 +0200 |
commit | 6e8477edd3a988357ad5f5fa6610904d44ec402c (patch) | |
tree | ceca96edd8d85acec19e2b5332da1f66ae341e55 /src/network/networkd-util.h | |
parent | network: constify several functions (diff) | |
download | systemd-6e8477edd3a988357ad5f5fa6610904d44ec402c.tar.xz systemd-6e8477edd3a988357ad5f5fa6610904d44ec402c.zip |
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.
Diffstat (limited to 'src/network/networkd-util.h')
-rw-r--r-- | src/network/networkd-util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-util.h b/src/network/networkd-util.h index 9c360f5526..8ffe4b5b5b 100644 --- a/src/network/networkd-util.h +++ b/src/network/networkd-util.h @@ -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 | \ |