dhcp_client->retry_times = retry_times;
dhcp_client->requested_ip = 0;
+ dhcp_client->state = INIT_SELECTING;
switch_listening_mode(dhcp_client, L2);
g_dhcp_client_start(dhcp_client, dhcp_client->last_address);
if (addr_count > 0 && st == 0) {
/* We only support one address atm */
- char str[INET6_ADDRSTRLEN + 1];
+ char addr_str[INET6_ADDRSTRLEN + 1];
if (preferred > valid)
/* RFC 3315, 22.6 */
dhcp_client->T1 = T1;
dhcp_client->T2 = T2;
- inet_ntop(AF_INET6, &addr, str, INET6_ADDRSTRLEN);
+ inet_ntop(AF_INET6, &addr, addr_str, INET6_ADDRSTRLEN);
debug(dhcp_client, "count %d addr %s T1 %u T2 %u",
- addr_count, str, T1, T2);
+ addr_count, addr_str, T1, T2);
- list = g_list_append(list, g_strdup(str));
+ list = g_list_append(list, g_strdup(addr_str));
if (code == G_DHCPV6_IA_NA)
memcpy(&dhcp_client->ia_na, &addr,
return TRUE;
if (dhcp_client->type == G_DHCP_IPV6) {
+ if (packet6 == NULL)
+ return TRUE;
+
count = 0;
client_id = dhcpv6_get_option(packet6, pkt_len,
G_DHCPV6_CLIENTID, &option_len, &count);