]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
wait-online: ignore -ENODATA on updating link information
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 May 2019 04:15:16 +0000 (13:15 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 May 2019 20:53:41 +0000 (05:53 +0900)
When netdev is not created yet, the -ENODATA is returned.

src/network/wait-online/manager.c

index e1f9a812fbb8c863ffb0f2c3aab44e1bcf4d3f48..e38b5603c22a043d512be3880711eb534d5a7106 100644 (file)
@@ -164,7 +164,7 @@ 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)
+                if (r < 0 && r != -ENODATA)
                         log_link_warning_errno(l, r, "Failed to update link state, ignoring: %m");
 
                 break;
@@ -253,8 +253,8 @@ static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *
 
         HASHMAP_FOREACH(l, m->links, i) {
                 r = link_update_monitor(l);
-                if (r < 0)
-                        log_link_warning_errno(l, r, "Failed to update monitor information: %m");
+                if (r < 0 && r != -ENODATA)
+                        log_link_warning_errno(l, r, "Failed to update link state, ignoring: %m");
         }
 
         if (manager_configured(m))