bootpc_call() times out

Chris Johns chrisj at
Mon Feb 15 21:03:39 UTC 2010

Till Straumann wrote:
> Chris Johns wrote:
>> Till Straumann wrote:
>>> Chris.
>>> I see that on 2008/05/01 you committed changes (authored by folks at 
>>>, it seems)
>>> that let bootpc_call() terminate if no server can be contacted for 
>>> some time.
>> Yes that is correct.
>>> This is different from pre 4.9 behavior which would keep on trying 
>>> forever
>>> until a server replied.
>>> What was the rationale for this (AFAIK undocumented) change ?
>> I think networking errors at this protocol level that result in a 
>> panic should be avoided. At a system it is fine to say reboot on a 
>> BOOTP error if that is your requirement but to code into the bootp 
>> protocol seem tough on those that wish to implement a different system 
>> level design. For example to try a second interface or to hand over to 
>> a configuration tool that can allow switching to a different 
>> configuration, ie recommissioning equipment.
>> I know this is not documentation but it was discussed on the list. :)
>> I will happily change the doco that is wrong. I was not aware the loop 
>> for-ever behaviour was documented. Where is it ?
> I don't know if it was explicitly documented but I do observe
> that existing semantics broke.
>> FYI the retry bootp code never worked because of a bug I fixed in 
>> April 2009.
>> It's just that up to 4.9 bootpc_init() would wait for a server
> to respond (due to the forever loop in bootpc_call()) which
> is no longer the case now.

The bug I fixed allowed a retry to work. After the first pass no more bootp 
requests worked because an error was returned setting a route. Removing the 
panic exposed the bug, ie the call never looped. The loop was a reset.

>>> IMO the old 'forever' loop made more sense.
>> Can you place the call in a loop ?
> IMHO bootpc_init() should then repeatedly call bootpc_call().

What if a parameter is added to bootp_init to control looping for ever on an 
error and the rtems_bsdnet_do_bootp and rtems_bsdnet_do_bootp_and_rootfs set 
the parameter to true ?

This means a user who wishes more control can roll their own and still be able 
to use the bootp code. I will also update the networkapp.t documentation to 
document the behaviour.


> - Till
>> Chris

More information about the users mailing list