]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make link enter failed state when link_initialized() is failed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 May 2021 04:00:08 +0000 (13:00 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jun 2021 21:35:49 +0000 (06:35 +0900)
src/network/networkd-link.c

index 837577c48e7c0afc5f8fe54d860e79dd9846f351..0330c336dff4847a91cb4b8f2eb8582e7c5a09a6 100644 (file)
@@ -1938,7 +1938,7 @@ int manager_udev_process_link(sd_device_monitor *monitor, sd_device *device, voi
 
         r = device_is_renaming(device);
         if (r < 0) {
-                log_device_error_errno(device, r, "Failed to determine the device is renamed or not, ignoring '%s' uevent: %m",
+                log_device_debug_errno(device, r, "Failed to determine the device is renamed or not, ignoring '%s' uevent: %m",
                                        device_action_to_string(action));
                 return 0;
         }
@@ -1949,12 +1949,13 @@ int manager_udev_process_link(sd_device_monitor *monitor, sd_device *device, voi
 
         r = link_get(m, ifindex, &link);
         if (r < 0) {
-                if (r != -ENODEV)
-                        log_debug_errno(r, "Failed to get link from ifindex %i, ignoring: %m", ifindex);
+                log_device_debug_errno(device, r, "Failed to get link from ifindex %i, ignoring: %m", ifindex);
                 return 0;
         }
 
-        (void) link_initialized(link, device);
+        r = link_initialized(link, device);
+        if (r < 0)
+                link_enter_failed(link);
 
         return 0;
 }