]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: dhcp4: downgrade log level when interface is removed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Apr 2021 15:07:09 +0000 (00:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Apr 2021 23:58:13 +0000 (08:58 +0900)
src/network/networkd-dhcp4.c

index 1c7f4127eb033276888762684aaacbe3eb04cb87..f20264be9e28f1b2b7fbf014ae6cb3624437302d 100644 (file)
@@ -1274,7 +1274,9 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
                                 if (link->network->dhcp_send_release) {
                                         r = sd_dhcp_client_send_release(client);
                                         if (r < 0)
-                                                log_link_warning_errno(link, r, "Failed to send DHCP RELEASE, ignoring: %m");
+                                                log_link_full_errno(link,
+                                                                    ERRNO_IS_DISCONNECT(r) ? LOG_DEBUG : LOG_WARNING,
+                                                                    r, "Failed to send DHCP RELEASE, ignoring: %m");
                                 }
 
                                 r = dhcp_lease_lost(link);