wave: (fixes #2419) BsmApplication should use RecvFrom, not SocketAddressTag

This commit is contained in:
Tommaso Pecorella
2016-05-22 01:35:26 +02:00
parent 19b295c2e2
commit e1f17fbb3c
2 changed files with 5 additions and 7 deletions

View File

@@ -46,6 +46,7 @@ Bugs fixed
- Bug 2398 - add SNR tag to beacons and probe responses
- Bug 2406 - Poor 802.11g performance in ad-hoc mode
- Bug 2414 - UdpSocket doesn't call NotifyConnectionFailed
- Bug 2419 - BsmApplication should use RecvFrom and not SocketAddressTag
Known issues
------------

View File

@@ -319,17 +319,14 @@ void BsmApplication::ReceiveWavePacket (Ptr<Socket> socket)
NS_LOG_FUNCTION (this);
Ptr<Packet> packet;
while ((packet = socket->Recv ()))
Address senderAddr;
while ((packet = socket->RecvFrom (senderAddr)))
{
Ptr<Node> rxNode = socket->GetNode ();
SocketAddressTag tag;
bool found;
found = packet->PeekPacketTag (tag);
if (found)
if (InetSocketAddress::IsMatchingType (senderAddr))
{
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag.GetAddress ());
InetSocketAddress addr = InetSocketAddress::ConvertFrom (senderAddr);
int nodes = m_adhocTxInterfaces->GetN ();
for (int i = 0; i < nodes; i++)
{