1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

sd-dhcp-client: log the MAC address we are using

This commit is contained in:
Tom Gundersen 2014-03-05 11:07:15 +01:00
parent 0ad6148e87
commit 02ec5cd78a

View File

@ -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;