This is the mail archive of the
mailing list for the eCos project.
[Bug 1001508] New: Add freebsd CDL option to allow broadcast packetsto be sent to 255.255.255.255
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Fri, 2 Mar 2012 21:23:17 +0000
- Subject: [Bug 1001508] New: Add freebsd CDL option to allow broadcast packetsto be sent to 255.255.255.255
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
Summary: Add freebsd CDL option to allow broadcast packets to
be sent to 255.255.255.255
Class: Advice Request
For reasons I've never understood, the BSD network stack has
historically coerced broadcast packets sent to 255.255.255.255 so that
they go out the door destined for the interface's local network
broadcast address instead of the specified global broadcast address.
IOW, if your network interface is configured as 192.168.100.33/24 and
you send a UDP broadcast packet to 255.255.255.255, it will actually be
sent with a destination IP of 192.168.100.255.
People in the BSD world have been complaining about (and working
around) this for ages.
The Linux network stack takes the simpler and more useful approach of
sending the packet to the destination as specified -- if you send
broadcast packet to 255.255.255.255, it goes out to 255.255.255.255,
and if you want to send a broadcast packet to 188.8.131.52, then
you send it to 192.168.100.255.
Several of our eCos based products must implement application protocols
that require UDP packets be sent to 255.255.255.255. To accomplish
this, I've been using a locally-modified bsd_tcpip stack with a CDL
option that allows you to choose either the (IMO broken) BSD behavior
or the Linux behavior. It defaults to the BSD behavior for the sake
of backwards-compatible brokenness.
Anyhow, here's a patch that adds the CDL option
It defaults to 1 which results in the traditional BSD behavior.
Setting it to 0 allows you to send packets to 255.255.255.255 by
specifying a destination address of 255.255.255.255.
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.