core: release DHCP lease when requested instead of always
authorDan Williams <dcbw@redhat.com>
Wed, 21 Sep 2011 05:30:38 +0000 (00:30 -0500)
committerDan Williams <dcbw@redhat.com>
Wed, 21 Sep 2011 05:30:38 +0000 (00:30 -0500)
src/nm-device.c

index d570d1b..c0b1b87 100644 (file)
@@ -1573,8 +1573,11 @@ nm_device_dhcp4_renew (NMDevice *self, gboolean release)
 
        g_return_val_if_fail (priv->dhcp4_client != NULL, FALSE);
 
+       nm_log_info (LOGD_DHCP4, "(%s): DHCPv4 lease renewal requested",
+                    nm_device_get_iface (self));
+
        /* Terminate old DHCP instance and release the old lease */
-       dhcp4_cleanup (self, TRUE, TRUE);
+       dhcp4_cleanup (self, TRUE, release);
 
        req = nm_device_get_act_request (self);
        g_assert (req);