Multiple problems in DHCP client
Chris Johns
chrisj at rtems.org
Fri May 6 23:06:16 UTC 2011
On 7/05/11 8:22 AM, Sebastien Bourdeauducq wrote:
> On Sat, 2011-05-07 at 07:42 +1000, Chris Johns wrote:
>>> 3) The variable rtems_bsdnet_nameserver_count is not set to 0 at the
>>> beginning of the DHCP request, which means that when DHCP is restarted,
>>> the DNS entries keep piling up until the table is full (3 entries), at
>>> which point the new DNS will not be taken into account at all.
>>
>> Another bug. The difficultly is a user who mixes the DHCP supplied
>> entries and initialised entries in the rtems_bsdnet_nameserver table. If
>> just the file was created would this solve the issue ?
>
> No, since as far as I can tell, the DHCP client simply adds to that file
> (with rtems_rootfs_file_append) and does not truncate it. However, it
> should make spotting that bug (and potential similar ones) easier - as
> the problem could be exposed simply by displaying the contents
> of /etc/resolv.conf.
>
Good point. On Unix DHCP just over writes the file. Maybe we should
O_TRUNC the file.
> I also think it should be better to remove the table and use
> resolv.conf ...
I do not use the tables and ignore them. Users who do will break when a
new stack appears.
Chris
More information about the users
mailing list