contrib: DHCP network monitor and fallback from DHCP to static address

Joel Sherrill joel.sherrill at OARcorp.com
Thu May 1 13:03:19 UTC 2008


Chris Johns wrote:
> Arnout Vandecappelle wrote:
>   
>> Chris Johns wrote:
>>     
>>> Arnout Vandecappelle wrote:
>>>       
>>>>  Hoi,
>>>>
>>>>  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.
>>>>         
>> [snip]
>>     
>>> 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...
>>     
>
> Ok.
>
>   
>>> 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
>> anymore...
>>
>>     
>
> 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.
>
>   
Thanks for reviewing and committing it.  Can you write
up an entry for the 4.9 release notes and add it to...

http://www.rtems.org/wiki/index.php/4.9_Release_Notes
> Regards
> Chris
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list