From 54064144d4956eb127b2193a0be682760fc94a1e Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 28 Sep 2018 14:58:37 +0200 Subject: [PATCH] dhcp: log whether the client was active It is useful to understand why the grace period was started. --- src/devices/nm-device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 0293e65158..8de4db55d8 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -7310,8 +7310,9 @@ dhcp4_fail (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - _LOGD (LOGD_DHCP4, "DHCPv4 failed (ip_state %s)", - _ip_state_to_string (priv->ip4_state)); + _LOGD (LOGD_DHCP4, "DHCPv4 failed (ip_state %s, was_active %d)", + _ip_state_to_string (priv->ip4_state), + priv->dhcp4.was_active); /* Keep client running if there are static addresses configured * on the interface. @@ -8063,8 +8064,9 @@ dhcp6_fail (NMDevice *self) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); gboolean is_dhcp_managed; - _LOGD (LOGD_DHCP6, "DHCPv6 failed (ip_state %s)", - _ip_state_to_string (priv->ip6_state)); + _LOGD (LOGD_DHCP6, "DHCPv6 failed (ip_state %s, was_active %d)", + _ip_state_to_string (priv->ip6_state), + priv->dhcp6.was_active); is_dhcp_managed = (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_MANAGED);