summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-02-14 21:38:59 +0100
committerThomas Haller <thaller@redhat.com>2023-02-21 09:20:51 +0100
commit2fe4313b92cea1d09f8da6d58a5e55b4506b8f9a (patch)
tree11683ae038dd6b3d8963864e00f753d99a707acc
parent07f1789725726506cb3ba379ac53bd9bd720654b (diff)
downloadNetworkManager-2fe4313b92cea1d09f8da6d58a5e55b4506b8f9a.tar.gz
dhcp: log used DHCP IAID as hexstr
This is also the format that we will use to expose it in the lease information. It's the format that dhclient uses.
-rw-r--r--src/core/devices/nm-device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 8629a3ef7d..8cd12bf1d8 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -1920,11 +1920,13 @@ out_fail:
iaid = nm_utils_create_dhcp_iaid(TRUE, (const guint8 *) iface, strlen(iface));
out_good:
if (!log_silent) {
+ char buf[NM_DHCP_IAID_TO_HEXSTR_BUF_LEN];
+
_LOGD(LOGD_DEVICE | LOGD_DHCPX(IS_IPv4) | LOGD_IPX(IS_IPv4),
- "ipv%c.dhcp-iaid: using %u (0x%08x) IAID (str: '%s', explicit %d)",
+ "ipv%c.dhcp-iaid: using %u (%s) IAID (str: '%s', explicit %d)",
nm_utils_addr_family_to_char(addr_family),
iaid,
- iaid,
+ nm_dhcp_iaid_to_hexstr(iaid, buf),
iaid_str,
is_explicit);
}