[En-Nut-Discussion] Use DHCP to configure ethernut IPaddr without renewal of IPaddr?
Dusan Ferbas
dferbas at etech.cz
Fri Jul 4 15:28:46 CEST 2008
Hi Erik,
removal is not a good idea. In that case, you will go against RFC.
See ftp://ftp.rfc-editor.org/in-notes/rfc2131.txt, 4.4.5.
It should be done as described in 2.2. (The client may ask for a
permanent assignment by asking for an infinite lease).
See 3.3 for details on this value.
But you are not save (Even when assigning "permanent" addresses, a
server may choose to give out lengthy but non-infinite leases ...).
It is an IP Address Lease Time option (0x33, 51). See
http://www.ietf.org/rfc/rfc2132.txt?number=2132, 9.2.
---------
So you can try to add following to DhcpSendRequest(), I think before
DhcpAddParmReqOption() call.
{
long lease_time = -1;
optlen += DhcpAddOption(op + optlen, DHCPOPT_LEASETIME,
&lease_time , sizeof(lease_time ));
}
Maybe also to DhcpBroadcastDiscover() , similar position.
At 12:00 4.7.2008, en-nut-discussion-request at egnite.de wrote:
>From: Erik L <erik.lindstein at gmail.com>
>Date: Fri, 4 Jul 2008 01:50:00 -0700 (PDT)
...
>Is there any other way to fix this then edit the dhcp.c source and remove
>the renewal features?
>
>Regards/Erik
Dusan
More information about the En-Nut-Discussion
mailing list