logging: log DHCP state changes
authorDan Williams <dcbw@redhat.com>
Sat, 1 May 2010 16:26:57 +0000 (09:26 -0700)
committerDan Williams <dcbw@redhat.com>
Sat, 1 May 2010 16:26:57 +0000 (09:26 -0700)
src/nm-device.c

index 01f1d72..4da051e 100644 (file)
@@ -1267,6 +1267,14 @@ dhcp_state_changed (NMDHCPClient *client,
        ipv6 = nm_dhcp_client_get_ipv6 (client);
        dev_state = nm_device_get_state (device);
 
+       if (ipv6) {
+               nm_log_dbg (LOGD_DHCP6, "(%s): new DHCPv6 client state %d",
+                           nm_device_get_iface (device), dev_state);
+       } else {
+               nm_log_dbg (LOGD_DHCP4, "(%s): new DHCPv4 client state %d",
+                           nm_device_get_iface (device), dev_state);
+       }
+
        switch (state) {
        case DHC_BOUND4:     /* lease obtained */
        case DHC_BOUND6: