Skip to content

Commit

Permalink
Added trace for debugging DHCPv6 failure reason.
Browse files Browse the repository at this point in the history
Change-Id: I926523eb724c22a3fb2d611ead8f5097f68fa978
  • Loading branch information
Juha Heiskanen committed Jun 19, 2019
1 parent aaf2b39 commit ce672ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/DHCPv6_Server/DHCPv6_Server_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ int DHCPV6_server_service_request_handler(uint16_t instance_id, uint32_t msg_tr_
replyPacket.T1 = dhcp_ia_non_temporal_params.T1;
replyPacket.iaId = dhcp_ia_non_temporal_params.iaId;
replyPacket.transaction_ID = msg_tr_id;

uint16_t duid_length = libdhcpv6_duid_option_size(replyPacket.clientDUID.linkType);
duid_length -= 8;
tr_debug("Response dhcp sol %u clientDUID", trace_array(replyPacket.clientDUID.linkID, duid_length));

//Check First Current list
if (DHCPv6_server_respond_client(serverBase, &replyPacket, &dhcp_ia_non_temporal_params, &responseBuf, true) == 0) {
//Respond
Expand Down
1 change: 1 addition & 0 deletions source/DHCPv6_client/dhcpv6_client_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ void dhcpv6_renew(protocol_interface_info_entry_t *interface, if_address_entry_t
// Default retry values are modified from specification update to message
dhcp_service_set_retry_timers(srv_data_ptr->transActionId, dhcp_client.sol_timeout, dhcp_client.sol_max_rt, dhcp_client.sol_max_rc);
}
tr_error("DHCP renew send OK");
}

static bool dhcpv6_client_set_address(int8_t interface_id, dhcpv6_client_server_data_t *srv_data_ptr)
Expand Down
2 changes: 2 additions & 0 deletions source/libDHCPv6/dhcp_service_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ void dhcp_service_send_message(msg_tr_t *msg_tr_ptr)
}
if (retval != 0) {
tr_warn("dhcp service socket_sendto fails: %i", retval);
} else {
tr_warn("dhcp service socket_sendto %s", msg_tr_ptr->addr.address);
}
}
bool dhcp_service_timer_tick(uint16_t ticks)
Expand Down

0 comments on commit ce672ba

Please sign in to comment.