Hi Justin,

On ke, 2014-07-16 at 11:12 -0700, Justin Maggard wrote:
> We need to specify a requested IP address when our DHCP client state
> is REBINDING as well as REQUESTING and REBOOTING; or else we end up
> sending a DHCP request for 0.0.0.0, which generally just gets ignored.
> ---
>  gdhcp/client.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gdhcp/client.c b/gdhcp/client.c
> index 47ce2e8..8a9e3b8 100644
> --- a/gdhcp/client.c
> +++ b/gdhcp/client.c
> @@ -484,13 +484,13 @@ static int send_request(GDHCPClient *dhcp_client)
>  
>       add_send_options(dhcp_client, &packet);
>  
> -     if (dhcp_client->state == RENEWING) {
> +     if (dhcp_client->state == RENEWING || dhcp_client->state == REBINDING)
>               packet.ciaddr = htonl(dhcp_client->requested_ip);
>  
> +     if (dhcp_client->state == RENEWING)
>               return dhcp_send_kernel_packet(&packet,
>                               dhcp_client->requested_ip, CLIENT_PORT,
>                               dhcp_client->server_ip, SERVER_PORT);
> -     }
>  
>       return dhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT,
>                                       INADDR_BROADCAST, SERVER_PORT,

Ack to this, looks good now.


Cheers,
Jukka


_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to