Skip to content

Commit

Permalink
Copied memory fix from PR ARMmbed#1858
Browse files Browse the repository at this point in the history
Change-Id: I3c0a741dd57795911d74d3e9b2c6ac92a818bfe8
  • Loading branch information
Juha Heiskanen committed Oct 11, 2018
1 parent 6500fcf commit 999bbc3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/DHCPv6_client/dhcpv6_client_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void dhcpv6_renew(protocol_interface_info_entry_t *interface, if_address_entry_t
payload_len = libdhcpv6_address_request_message_len(srv_data_ptr->clientLinkIdType, srv_data_ptr->serverLinkType, 0);
payload_ptr = ns_dyn_mem_temporary_alloc(payload_len);
if (payload_ptr == NULL) {
addr->state_timer = 200;//Retry after? should there be maximum 20 second retry
addr->state_timer = 200; //Retry after 20 seconds
tr_error("Out of memory");
return ;
}
Expand All @@ -292,6 +292,11 @@ void dhcpv6_renew(protocol_interface_info_entry_t *interface, if_address_entry_t
libdhcpv6_generic_nontemporal_address_message_write(payload_ptr, &packetReq, &nonTemporalAddress, &serverLink);
// send solicit
srv_data_ptr->transActionId = dhcp_service_send_req(dhcp_client.service_instance, 0, srv_data_ptr, srv_data_ptr->server_address, payload_ptr, payload_len, dhcp_solicit_resp_cb);
if (srv_data_ptr->transActionId == 0) {
ns_dyn_mem_free(payload_ptr);
addr->state_timer = 200; //Retry after 20 seconds
tr_error("DHCP renew send failed");
}
}

void dhcpv6_client_set_address(int8_t interface_id, dhcpv6_client_server_data_t *srv_data_ptr)
Expand Down

0 comments on commit 999bbc3

Please sign in to comment.