]> 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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 May 2021 12:51:08 +0000 (14:51 +0200)
(cherry picked from commit e558d4f47a9c01b007fc193cabcf0dea8370a5f1)

src/network/networkd-dhcp4.c

index 6f06e2218d348897461b8b66984da1fc4351d998..23dc3a45dbe019a787f7f12af10a3c9db8477f64 100644 (file)
@@ -8,6 +8,7 @@
 #include "escape.h"
 #include "alloc-util.h"
 #include "dhcp-client-internal.h"
+#include "errno-util.h"
 #include "hostname-setup.h"
 #include "hostname-util.h"
 #include "parse-util.h"
@@ -1070,7 +1071,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);