summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvin Å ipraga <alsi@bang-olufsen.dk>2021-08-31 14:17:33 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-10-12 17:50:56 +0200
commita2fa0a2ef4aeb49130e82ce1e12dbaa76b6cd2f5 (patch)
treed26438cf98a35bcca2cce30347e3fdbf1a191c27
parentd44965483af1a492a2b5fa0b1c1881ad167a7ea3 (diff)
downloadsystemd-a2fa0a2ef4aeb49130e82ce1e12dbaa76b6cd2f5.tar.gz
network: print Ethernet Link-Layer DHCP client ID with leading 0's
This is a small cosmetic change. Before: Offered DHCP leases: 192.168.0.183 (to 0:9:a7:36:bc:89) After: Offered DHCP leases: 192.168.0.183 (to 00:09:a7:36:bc:89) (cherry picked from commit 8e664ab6ecc9c420d2151f14b36824aecc76d8ac) (cherry picked from commit 133354a3b9fc7b88fb143f241cfc4565b943ae87)
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 70a01c9245..c382c2c386 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -187,7 +187,7 @@ int sd_dhcp_client_id_to_string(const void *data, size_t len, char **ret) {
if (len != sizeof_field(sd_dhcp_client_id, eth))
return -EINVAL;
- r = asprintf(&t, "%x:%x:%x:%x:%x:%x",
+ r = asprintf(&t, "%02x:%02x:%02x:%02x:%02x:%02x",
client_id->eth.haddr[0],
client_id->eth.haddr[1],
client_id->eth.haddr[2],