| Summary: | Bug in network stack in sending broadcast packets | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Dave Duchscher <daved> |
| Component: | kern | Assignee: | Bruce M Simpson <bms> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.5-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Dave Duchscher
2002-04-26 15:37:45 UTC
Found that after using ifconfig to reconfigure the interface,
all ones broadcast (255.255.255.255) can be sent. Before
being reconfigured, the all ones broadcasts would be converted
to a subnet broadcast which I believe is the desired behavior.
How-To-Repeat:
Just reconfigure the interface and you will be able to send
all ones broadcast packets. You do not have to change the
configuration of the interface, just issuing an ifconfig with
the same settings will work. The steps I took on
reconfiguring the interface where:
ifconfig fxp0 inet 10.1.4.1 broadcast 255.255.255.0
add route default 10.1.4.1
I used the following perl code to send the broadcast packets:
use IO::Socket;
$sock = new IO::Socket::INET ( LocalPort => 10000,
Proto => 'udp');
$sock->sockopt(SO_BROADCAST, 1);
$dest = sockaddr_in(10000, inet_aton("255.255.255.255"));
$sock->send("weeee", undef, $dest);
Used tcpdump to on same machine and another machine to
confirm. I have not found a way return to the behavior of
sending out subnet broadcast packets besides the obvious
reboot.
Responsible Changed From-To: freebsd-bugs->freebsd-net Assign to net mailing list for evaluation Responsible Changed From-To: freebsd-net->wes I'm working on all-call broadcasting code already, I'll fix this. Responsible Changed From-To: wes->bms Bruce has already fixed this in -current and will soon MFC. Or at least something like it. State Changed From-To: open->patched I've committed a fix for the fix. -CURRENT's behaviour is correct in this regard. I am seeking permission from re@ to MFC this. State Changed From-To: patched->closed The fix has been approved by re@ today and MFC'd. Please use the new socket option to get the correct behaviour in your applications. |