summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-15 13:18:50 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-15 13:19:03 +0200
commitdb73295accbec0c6513817f0a64a92018592bb26 (patch)
tree3199040de4a794dc8020c56cab5d8bb8e1155801 /src/libsystemd-network
parentc22bf27beea56516d8f83784759fb30495e058d7 (diff)
util: never use ether_ntoa(), since it formats with %x, not %02x, which makes ethernet addresses look funny
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index f5910d9e0b..8a9887d19f 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -1420,6 +1420,7 @@ static int client_receive_message_raw(sd_event_source *s, int fd,
}
int sd_dhcp_client_start(sd_dhcp_client *client) {
+ char buffer[ETHER_ADDR_TO_STRING_MAX];
int r;
assert_return(client, -EINVAL);
@@ -1435,7 +1436,7 @@ int sd_dhcp_client_start(sd_dhcp_client *client) {
if (r >= 0)
log_dhcp_client(client, "STARTED on ifindex %u with address %s",
client->index,
- ether_ntoa(&client->client_id.mac_addr));
+ ether_addr_to_string(&client->client_id.mac_addr, buffer));
return r;
}