From: Tobias Brunner Date: Fri, 7 May 2021 14:17:54 +0000 (+0200) Subject: dhcp: Log MAC address when sending DISCOVER message X-Git-Tag: 5.9.3dr3~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a82f13e7ceff8cde0327d93bb5567d72a2c12fb5;p=thirdparty%2Fstrongswan.git dhcp: Log MAC address when sending DISCOVER message Closes strongswan/strongswan#239. --- diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c index ce3191d537..55fb1f7f3a 100644 --- a/src/libcharon/plugins/dhcp/dhcp_socket.c +++ b/src/libcharon/plugins/dhcp/dhcp_socket.c @@ -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;