[Ns-bugs] [Bug 51] Allow UDP sockets to receive broadcast
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Sep 21 09:42:48 PDT 2007
http://www.nsnam.org/bugzilla/show_bug.cgi?id=51
------- Comment #8 from gjcarneiro at gmail.com 2007-09-21 12:42 -------
The source of the problem is udp-socket.cc, UdpSocket::DoSendTo:
if (dest.IsBroadcast ())
{
NS_LOG_LOGIC ("Limited broadcast");
for (uint32_t i = 0; i < ipv4->GetNInterfaces (); i++ )
{
Ipv4Address addri = ipv4->GetAddress (i);
Ipv4Mask maski = ipv4->GetNetworkMask (i);
m_udp->Send (p, addri, addri.GetSubnetDirectedBroadcast (maski),
m_endPoint->GetLocalPort (), port);
NotifyDataSent (p.GetSize ());
}
}
This "addri.GetSubnetDirectedBroadcast (maski)" is changing the 255.255.255.255
address to 10.0.255.255. This behavior does not match my real world
experience. Replacing "addri.GetSubnetDirectedBroadcast (maski)" with "dest"
fixes the problem. Any comments?
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list