contrib: DHCP network monitor and fallback from DHCP to static address
chrisj at rtems.org
Wed Apr 30 21:59:18 CDT 2008
Arnout Vandecappelle wrote:
> Chris Johns wrote:
>> Arnout Vandecappelle wrote:
>>> My colleague Maarten and I have developed an extension to the DHCP
>>> client which allows monitoring the network interface and restarting DHCP
>>> when the network changes.
>> Why was the nfs_diskless_valid code removed ?
> Because it is useless as it is (nfs_diskless_valid is never set in the
> existing code, and is not exported in any header; it's historical in the
> bsdnet code and has been copied blindly into the DHCP client code). In
> addition, if anyone would ever set nfs_diskless_valid to one, the
> do_dhcp_timeout wouldn't work anymore...
>> The rtems_bsdnet_do_dhcp change is wrong. You need to obtain the
>> network semaphore after the timeout not release it.
> Ouch. Good observation.
>> Why the changes in bootp_subr.c with the order of the calls to ifioctl ?
> Oops. Fall-out from trying to re-configure the interface without
> de-configuring it first. Slipped through my minimal-change filter.
> Shouldn't make any difference, though.
> The last two issues are removed in the attached patch. However, this
> has not been tested at all because I don't have access to the board
This look fine and I have committed changes. I have removed the dhcp_task_id
initialisation as an uninitialised value is set to 0 and this save ROM space.
In the fail safe code and I see do_dhcp_init is global. Should this be static
? I have made it static.
I have had to fix the includes to get the fail safe code to compile. Please
check the code in CVS.
I have tested the normal DHCP operation on the mcf5235 BSP.
Thanks for the patch.
More information about the rtems-users