lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] DHCP client release 22-1-2002


From: leon . woestenberg
Subject: [lwip-users] Re: [lwip] DHCP client release 22-1-2002
Date: Thu, 09 Jan 2003 01:33:41 -0000

Hello Horst,


> Additional:
> For going working I had to add two statements (you saved the offered ip
> address to "state->offered_ip_addr" only and not back to
> "netif->ip_addr").

> In static void dhcp_handle_offer(struct dhcp_state *state):
>         ip_addr_set(&state->offered_ip_addr, (struct ip_addr
>*)&state->msg_in->yiaddr);
>         DEBUGF(DHCP_DEBUG, (" offer for 0x%08lx\r\n",
>state->offered_ip_addr.addr));
>         ip_addr_set(&state->netif->ip_addr, &state->offered_ip_addr);
>/*+hg*/
>
>And in static void dhcp_handle_ack(struct dhcp_state *state)
>   ip_addr_set(&state->offered_ip_addr, &state->msg_in->yiaddr);
>   ip_addr_set(&state->netif->ip_addr, &state->offered_ip_addr); /*+hg*/
>
> I'm not sure - is this correct? Is this all?
>
No, this is not correct.

The interface "binds" to the DHCP offered configuration in
dhcp_bind().

Very summarized, this is what is SENT by the DHCP client and server in a
one-step, flawless configuration:

client            server
------------------------
DISCOVER
                  OFFER
REQUEST
                  ACK

Only after the ACK has been received by the client, will it setup the
interface.

Provide me with a debug log, or a packet log if this doesn't seem to
be happening to you. Also try using the DHCP server's debug capabilities
to see it's state.

Regards,

Leon.

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]