]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
wait-online: downgrade log level of failure that interface is removed or unmanaged...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 May 2023 05:30:58 +0000 (14:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 May 2023 10:06:06 +0000 (19:06 +0900)
Closing #27145.

src/network/wait-online/manager.c

index f481149d81288c6aa3121e6d5dec2e57aff7006c..2e845aa19f1043e4e0b01d185a94508c31d34560 100644 (file)
@@ -239,8 +239,9 @@ static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *
                         log_link_warning_errno(l, r, "Failed to process RTNL link message, ignoring: %m");
 
                 r = link_update_monitor(l);
-                if (r < 0 && r != -ENODATA)
-                        log_link_warning_errno(l, r, "Failed to update link state, ignoring: %m");
+                if (r < 0)
+                        log_link_full_errno(l, IN_SET(r, -ENODATA, -ENOENT) ? LOG_DEBUG : LOG_WARNING, r,
+                                            "Failed to update link state, ignoring: %m");
 
                 break;
 
@@ -324,8 +325,9 @@ static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *
 
         HASHMAP_FOREACH(l, m->links_by_index) {
                 r = link_update_monitor(l);
-                if (r < 0 && r != -ENODATA)
-                        log_link_warning_errno(l, r, "Failed to update link state, ignoring: %m");
+                if (r < 0)
+                        log_link_full_errno(l, IN_SET(r, -ENODATA, -ENOENT) ? LOG_DEBUG : LOG_WARNING, r,
+                                            "Failed to update link state, ignoring: %m");
         }
 
         if (manager_configured(m))