bug 857 - Link-Local Multicast handle in Ipv4 Output processing
This commit is contained in:
1 parent
3ccf6c8ee7
commit
2c5084e25f
6 files changed
+39
-3
No files matched your search
@@ -539,8 +539,8 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
|
||||
// 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand)
|
||||
// 5) packet is not broadcast, and route is NULL (e.g., a raw socket call, or ICMP)
|
||||
|
||||
// 1) packet is destined to limited broadcast address
|
||||
if (destination.IsBroadcast ())
|
||||
// 1) packet is destined to limited broadcast address or link-local multicast address
|
||||
if (destination.IsBroadcast () || destination.IsLocalMulticast ())
|
||||
{
|
||||
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 1: limited broadcast");
|
||||
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
|
||||
|
||||
@@ -256,6 +256,16 @@ UdpSocketImplTest::DoRun (void)
|
||||
m_receivedPacket = 0;
|
||||
m_receivedPacket2 = 0;
|
||||
|
||||
// Simple Link-local multicast test
|
||||
|
||||
txSocket->BindToNetDevice (txDev1);
|
||||
SendData (txSocket, "224.0.0.9");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 0, "first socket should not receive it (it is bound specifically to the second interface's address");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 123, "recv2: 224.0.0.9");
|
||||
|
||||
m_receivedPacket->RemoveAllByteTags ();
|
||||
m_receivedPacket2->RemoveAllByteTags ();
|
||||
|
||||
Simulator::Destroy ();
|
||||
|
||||
return GetErrorStatus ();
|
||||
|
||||
Reference in new issue
Block a user