diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-29 13:14:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-29 13:33:07 +0200 |
commit | 04852d2877cf94d80d17d0e3f46eb1d286a0ecdb (patch) | |
tree | eceb552706cb8ed7157da11d129d098fd797b3ec | |
parent | 4feb58b50b9fd6caceda83bab907ad107ad8ed01 (diff) | |
download | NetworkManager-04852d2877cf94d80d17d0e3f46eb1d286a0ecdb.tar.gz |
dhcp: log setting and clearing systemd dhcp client instance
internal systemd code produces logging messages by itself, like
libsystemd: DHCP CLIENT (0x9204b5ce): ACK
Let's log the pointer value initially, to associate the logged "xid"
with the pointer value of the client.
Now we get:
<trace> [1464520695.7655] dhcp4 (enp0s25): dhcp-client4: set 0x556cdd9d6800
<debug> [1464520695.7658] libsystemd: DHCP CLIENT (0x9d87b7c5): STARTED on ifindex 2
-rw-r--r-- | src/dhcp-manager/nm-dhcp-systemd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dhcp-manager/nm-dhcp-systemd.c b/src/dhcp-manager/nm-dhcp-systemd.c index 10f03ec962..ae9936e05d 100644 --- a/src/dhcp-manager/nm-dhcp-systemd.c +++ b/src/dhcp-manager/nm-dhcp-systemd.c @@ -578,6 +578,8 @@ ip4_start (NMDhcpClient *client, const char *dhcp_anycast_addr, const char *last return FALSE; } + _LOGT ("dhcp-client4: set %p", priv->client4); + r = sd_dhcp_client_attach_event (priv->client4, NULL, 0); if (r < 0) { _LOGW ("failed to attach event (%d)", r); @@ -895,6 +897,8 @@ ip6_start (NMDhcpClient *client, return FALSE; } + _LOGT ("dhcp-client6: set %p", priv->client4); + if (info_only) sd_dhcp6_client_set_information_request (priv->client6, 1); @@ -973,6 +977,10 @@ stop (NMDhcpClient *client, gboolean release, const GByteArray *duid) NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE (self); int r = 0; + _LOGT ("dhcp-client%d: stop %p", + priv->client4 ? '4' : '6', + priv->client4 ? (gpointer) priv->client4 : (gpointer) priv->client6); + if (priv->client4) { sd_dhcp_client_set_callback (priv->client4, NULL, NULL); r = sd_dhcp_client_stop (priv->client4); |