diff options
author | Alvin Šipraga <alsi@bang-olufsen.dk> | 2021-08-31 14:17:33 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-09-01 00:04:04 +0900 |
commit | 8e664ab6ecc9c420d2151f14b36824aecc76d8ac (patch) | |
tree | 4765973afaadf8d6a5a1f867b5bc48cea58b0a8f /src/libsystemd-network/sd-dhcp-client.c | |
parent | 37b3e1394a0f89fb5aabc55b5f0b37a402d3ba0b (diff) | |
download | systemd-8e664ab6ecc9c420d2151f14b36824aecc76d8ac.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)
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 2 |
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 fb89f7c7f1..65314f424c 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -192,7 +192,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], |