summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-01-02 20:34:56 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-02-11 17:14:55 +0100
commit13176bfedc9c3e7586d66c9bb293364b56a4933f (patch)
treec811114244f3a740f41d76477e8a8d4d803efe12 /src/network/networkd-link.c
parentudev-util: introduce device_is_processing() helper function (diff)
downloadsystemd-13176bfedc9c3e7586d66c9bb293364b56a4933f.tar.xz
systemd-13176bfedc9c3e7586d66c9bb293364b56a4933f.zip
network: do not enter initialized state when the interface is being processed by udevd
Fixes #30056.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index c0d0f83ca3..ee442e3a4b 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1651,6 +1651,14 @@ static int link_check_initialized(Link *link) {
return 0;
}
+ r = device_is_processing(device);
+ if (r < 0)
+ return log_link_warning_errno(link, r, "Failed to determine whether the device is being processed: %m");
+ if (r > 0) {
+ log_link_debug(link, "Interface is being processed by udevd, pending initialization.");
+ return 0;
+ }
+
return link_initialized(link, device);
}