]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
dhcp: Log MAC address when sending DISCOVER message
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 May 2021 14:17:54 +0000 (16:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 May 2021 10:06:47 +0000 (12:06 +0200)
Closes strongswan/strongswan#239.

src/libcharon/plugins/dhcp/dhcp_socket.c

index ce3191d537b9266a0dcdca97acfafcd829364420..55fb1f7f3a46a68111c096648ba28621f9d75a42 100644 (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;