[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BSDnet sets wrong broadcast address for DHCP.
- Date: Thu, 22 May 2008 12:52:27 +0200
- From: arnout at mind.be (Arnout Vandecappelle)
- Subject: BSDnet sets wrong broadcast address for DHCP.
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...
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...