summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-11-08 12:38:42 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-11-11 03:53:24 +0100
commited3bab7a0e9097e443599297bf5a916315a8d574 (patch)
tree8ce8a02f69f43277ccb7c4c3ece92eaeb02be741 /src/network
parentVarious multi-dt fixes and CHID test (#35056) (diff)
downloadsystemd-ed3bab7a0e9097e443599297bf5a916315a8d574.tar.xz
systemd-ed3bab7a0e9097e443599297bf5a916315a8d574.zip
netwrok: call link_drop_unmanaged_config() earlier in link_configure()
Otherwise, even if a link enters the configuring state at the beginning of link_configure(), link_check_ready() may be called before link_drop_unmanaged_config() is called, and the link may enter the configured state. Fixes #35092.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 080e6beff3..ab74260adb 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1148,6 +1148,10 @@ static int link_configure(Link *link) {
link_set_state(link, LINK_STATE_CONFIGURING);
+ r = link_drop_unmanaged_config(link);
+ if (r < 0)
+ return r;
+
r = link_new_bound_to_list(link);
if (r < 0)
return r;
@@ -1253,10 +1257,6 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
- r = link_drop_unmanaged_config(link);
- if (r < 0)
- return r;
-
r = link_request_static_configs(link);
if (r < 0)
return r;