]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: do not enter initialized state when the interface is being processed by...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Jan 2024 19:34:56 +0000 (04:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Feb 2024 16:14:55 +0000 (01:14 +0900)
Fixes #30056.

src/network/networkd-link.c

index c0d0f83ca30f9317884932cf70dfccbc2159371b..ee442e3a4bb5408f7721d9d601342ed98c116c34 100644 (file)
@@ -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);
 }