[Bug 1841] Incorrect processing of DNS info from DHCP

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Dec 5 01:45:43 UTC 2011


--- Comment #5 from Chris Johns <chrisj at rtems.org> 2011-12-04 19:45:37 CST ---
(In reply to comment #3)
> RCS file: /usr1/CVS/rtems/cpukit/libnetworking/rtems/rtems_dhcp.c,v
> retrieving revision 1.9
> diff -r1.9 rtems_dhcp.c
> 1089c1089
> <         strcat(buf, inet_ntoa(rtems_bsdnet_ntpserver[i]));
> ---
> >         strcat(buf, inet_ntoa(rtems_bsdnet_nameserver[i]));


> For (2), I see it statically initialized to 0 in rtems_glue.c
> ./rtems/rtems_glue.c:int rtems_bsdnet_nameserver_count = 0;

This is no good. It only works for the first attempt. Any further DHCP requests
will create a problem. The '= 0' should be removed and the value set when the
request is processed.

The hack to support the name servers like this can go. It pre-dates a suitable
file system. The /etc/resolve.conf should be the only supported method of
managing the resolver. We should consider this. A new stack will not contain
this table and applications that depend on it should be given notice this will
go away.

Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the bugs mailing list