chiark / gitweb /
sd-dhcp-client: log the MAC address we are using
[elogind.git] / src / libsystemd-network / sd-dhcp-client.c
index b6810a9efed8ad40422d707f4da0ddea9cf777c9..07b27d53939db5e60ed4188c166f86179e989526 100644 (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;