BSDnet sets wrong broadcast address for DHCP.

Arnout Vandecappelle arnout at mind.be
Thu May 22 10:52:27 UTC 2008


 Hoi all,

 I've encountered some strangeness in my RTEMS code and wonder if it's
my fault or BSDnet's...

 When I use DHCP, it turns out that the requests are sent out to
0.255.255.255 rather than 255.255.255.255...  This happens because
in_ifinit() doesn't retain the existing broadcast address, but
overwrites it based on the netmask, and in addition it ignores a netmask
of 0.0.0.0 and falls back on the class A,B,C categorization.

 As a solution, I made a special case for IP address 0.0.0.0 (see
attached patch), which solves the problem.

 Unfortunately, I seem to remember that in the past, the DHCP requests
_were_ sent to 255.255.255.255!  I'm unable to reconstruct that
situation, however.  Could someone check for me if the stock RTEMS sends
DHCP requests to the correct address?  If so, the attached patch is
unnecessary and I should find out what goes wrong in my case...

 Regards,
 Arnout

-- 
Arnout Vandecappelle                     arnout at mind be
Senior Embedded Software Architect       +32-16-286540
Mind Embedded Development (an Essensium division)
GPG fingerprint:  D206 D44B 5155 DF98 550D  3F2A 2213 88AA A1C7 C933

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-dhcp-broadcast
URL: <http://lists.rtems.org/pipermail/users/attachments/20080522/17ea1d96/attachment.ksh>


More information about the users mailing list