dhcp: Log MAC address when sending DISCOVER message

Closes strongswan/strongswan#239.
This commit is contained in:
Tobias Brunner
2021-05-27 12:06:47 +02:00
parent 6c49ddfbca
commit a82f13e7ce
+3 -1
View File
@@ -307,11 +307,13 @@ static bool discover(private_dhcp_socket_t *this,
{
dhcp_option_t *option;
dhcp_t dhcp;
chunk_t mac;
int optlen;
optlen = prepare_dhcp(this, transaction, DHCP_DISCOVER, &dhcp);
DBG1(DBG_CFG, "sending DHCP DISCOVER to %H", this->dst);
mac = chunk_from_thing(dhcp.client_hw_addr);
DBG1(DBG_CFG, "sending DHCP DISCOVER for %#B to %H", &mac, this->dst);
option = (dhcp_option_t*)&dhcp.options[optlen];
option->type = DHCP_PARAM_REQ_LIST;