summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-client.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-05 11:07:15 +0100
committerTom Gundersen <teg@jklm.no>2014-03-05 11:07:15 +0100
commit02ec5cd78a148c2c05c0d6e5016ae04570a9ef97 (patch)
tree9f54c5183e06b3087a4637405372d7d87a2e6a0e /src/libsystemd-network/sd-dhcp-client.c
parent0ad6148e87cd1348be81d9e83c4364a09dab2c29 (diff)
sd-dhcp-client: log the MAC address we are using
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index b6810a9efe..07b27d5393 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -143,6 +143,15 @@ int sd_dhcp_client_set_mac(sd_dhcp_client *client,
assert_return(client, -EINVAL);
assert_return(client->state == DHCP_STATE_INIT, -EBUSY);
+ log_dhcp_client(client, "set MAC address to "
+ "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ addr->ether_addr_octet[0],
+ addr->ether_addr_octet[1],
+ addr->ether_addr_octet[2],
+ addr->ether_addr_octet[3],
+ addr->ether_addr_octet[4],
+ addr->ether_addr_octet[5]);
+
memcpy(&client->mac_addr, addr, ETH_ALEN);
return 0;