1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

network: drop REMOVING flag when a netlink message is sent to kernel

When an interface goes to down, the kernel drops several routes
automatically, and at the same time networkd requests to remove
them, but the kernel sometimes does not respond the requests. Hence,
the routes cannot drop the REMOVING flag, and networkd will never try
to configure other routes which depend on the previously removed
routes even if they are already reconfigured.

With this patch, when networkd sends a request to configure a route
(or any other network settings), REMOVING flag for the route is dropped
without waiting for the reply about the previous remove request, as we
can expect it will appear even if it is already removed or under removing.

Fixes #24999.

(cherry picked from commit f4ee7b98c4)
This commit is contained in:
Yu Watanabe 2022-11-22 13:03:55 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent a064abff76
commit 8999727a82

View File

@ -96,7 +96,8 @@ int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);
static inline void name##_enter_configuring(type *t) { \
name##_update_state(t, \
NETWORK_CONFIG_STATE_REQUESTING | \
NETWORK_CONFIG_STATE_CONFIGURING, \
NETWORK_CONFIG_STATE_CONFIGURING | \
NETWORK_CONFIG_STATE_REMOVING, \
NETWORK_CONFIG_STATE_CONFIGURING); \
} \
static inline void name##_enter_configured(type *t) { \