Zbigniew Jędrzejewski-Szmek f4a676
From b2d91572a13de1cf5bdf78c3926b50cacc8a5dd3 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek f4a676
From: Lennart Poettering <lennart@poettering.net>
Zbigniew Jędrzejewski-Szmek f4a676
Date: Mon, 22 May 2017 14:38:01 +0200
Zbigniew Jędrzejewski-Szmek f4a676
Subject: [PATCH] sd-dhcp: library code shouldn't log above LOG_DEBUG (#6001)
Zbigniew Jędrzejewski-Szmek f4a676
Zbigniew Jędrzejewski-Szmek f4a676
Let's downgrade the warning introduced by
Zbigniew Jędrzejewski-Szmek f4a676
955d99edc7991386a36e3d33924cc584931fde91 to debug, as we really
Zbigniew Jędrzejewski-Szmek f4a676
shouldn't log at more than debug level from library code.
Zbigniew Jędrzejewski-Szmek f4a676
Zbigniew Jędrzejewski-Szmek f4a676
(And while we are at it, print the MTU as the right (unsigned) type in
Zbigniew Jędrzejewski-Szmek f4a676
the format string.)
Zbigniew Jędrzejewski-Szmek f4a676
(cherry picked from commit 4dd53da97daf3f064149380b6ca9e53273d77d88)
Zbigniew Jędrzejewski-Szmek f4a676
---
Zbigniew Jędrzejewski-Szmek f4a676
 src/libsystemd-network/sd-dhcp-lease.c | 2 +-
Zbigniew Jędrzejewski-Szmek f4a676
 1 file changed, 1 insertion(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek f4a676
Zbigniew Jędrzejewski-Szmek f4a676
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
Zbigniew Jędrzejewski-Szmek f4a676
index 565ec4cbe4..13dc6e4386 100644
Zbigniew Jędrzejewski-Szmek f4a676
--- a/src/libsystemd-network/sd-dhcp-lease.c
Zbigniew Jędrzejewski-Szmek f4a676
+++ b/src/libsystemd-network/sd-dhcp-lease.c
Zbigniew Jędrzejewski-Szmek f4a676
@@ -595,7 +595,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
Zbigniew Jędrzejewski-Szmek f4a676
                 if (r < 0)
Zbigniew Jędrzejewski-Szmek f4a676
                         log_debug_errno(r, "Failed to parse MTU, ignoring: %m");
Zbigniew Jędrzejewski-Szmek f4a676
                 if (lease->mtu < DHCP_DEFAULT_MIN_SIZE) {
Zbigniew Jędrzejewski-Szmek f4a676
-                        log_warning("MTU value of %d too small. Using default MTU value of %d instead.", lease->mtu, DHCP_DEFAULT_MIN_SIZE);
Zbigniew Jędrzejewski-Szmek f4a676
+                        log_debug("MTU value of %" PRIu16 " too small. Using default MTU value of %d instead.", lease->mtu, DHCP_DEFAULT_MIN_SIZE);
Zbigniew Jędrzejewski-Szmek f4a676
                         lease->mtu = DHCP_DEFAULT_MIN_SIZE;
Zbigniew Jędrzejewski-Szmek f4a676
                 }
Zbigniew Jędrzejewski-Szmek f4a676