bug 868 - invalid packet size after Ipv4L3Protocol::Send
This commit is contained in:
@@ -110,6 +110,7 @@ many cases referencing the Bugzilla bug number
|
||||
- bug 865 - Ipv4RawSocketImpl::RecvFrom does not return from address all the time.
|
||||
- bug 859 - Output interface estimation for the source address bound socket in IPv4 Raw socket
|
||||
- bug 857 - Link-Local Multicast handle in Ipv4 Output processing
|
||||
- bug 868 - invalid packet size after Ipv4L3Protocol::Send
|
||||
|
||||
Known issues
|
||||
------------
|
||||
|
||||
@@ -594,7 +594,7 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
|
||||
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
|
||||
int32_t interface = GetInterfaceForDevice (route->GetOutputDevice ());
|
||||
m_sendOutgoingTrace (ipHeader, packet, interface);
|
||||
SendRealOut (route, packet, ipHeader);
|
||||
SendRealOut (route, packet->Copy (), ipHeader);
|
||||
return;
|
||||
}
|
||||
// 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand)
|
||||
@@ -624,7 +624,7 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
|
||||
{
|
||||
int32_t interface = GetInterfaceForDevice (newRoute->GetOutputDevice ());
|
||||
m_sendOutgoingTrace (ipHeader, packet, interface);
|
||||
SendRealOut (newRoute, packet, ipHeader);
|
||||
SendRealOut (newRoute, packet->Copy (), ipHeader);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -120,9 +120,8 @@ void
|
||||
Ipv4RawSocketImplTest::DoSendData (Ptr<Socket> socket, std::string to)
|
||||
{
|
||||
Address realTo = InetSocketAddress (Ipv4Address(to.c_str()), 0);
|
||||
socket->SendTo (Create<Packet> (123), 0, realTo);
|
||||
// NS_TEST_EXPECT_MSG_NE (socket->SendTo (Create<Packet> (123), 0, realTo),
|
||||
// -1, to);
|
||||
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
|
||||
123, to);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -205,7 +204,7 @@ Ipv4RawSocketImplTest::DoRun (void)
|
||||
// Create the IPv4 Raw sockets
|
||||
Ptr<SocketFactory> rxSocketFactory = rxNode->GetObject<Ipv4RawSocketFactory> ();
|
||||
Ptr<Socket> rxSocket = rxSocketFactory->CreateSocket ();
|
||||
NS_TEST_EXPECT_MSG_EQ (rxSocket->Bind (InetSocketAddress (Ipv4Address ("0.0.0.0.0"), 0)), 0, "trivial");
|
||||
NS_TEST_EXPECT_MSG_EQ (rxSocket->Bind (InetSocketAddress (Ipv4Address ("0.0.0.0"), 0)), 0, "trivial");
|
||||
rxSocket->SetRecvCallback (MakeCallback (&Ipv4RawSocketImplTest::ReceivePkt, this));
|
||||
|
||||
Ptr<Socket> rxSocket2 = rxSocketFactory->CreateSocket ();
|
||||
@@ -230,7 +229,7 @@ Ipv4RawSocketImplTest::DoRun (void)
|
||||
|
||||
SendData (txSocket, "255.255.255.255");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 143, "recv: 255.255.255.255");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 143, "second socket should not receive it (it is bound specifically to the second interface's address");
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 0, "second socket should not receive it (it is bound specifically to the second interface's address");
|
||||
|
||||
m_receivedPacket->RemoveAllByteTags ();
|
||||
m_receivedPacket2->RemoveAllByteTags ();
|
||||
@@ -240,9 +239,7 @@ Ipv4RawSocketImplTest::DoRun (void)
|
||||
|
||||
txSocket->Bind (InetSocketAddress (Ipv4Address ("10.0.0.2"), 0));
|
||||
SendData (txSocket, "224.0.0.9");
|
||||
#if 0
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 143, "recv: 224.0.0.9");
|
||||
#endif
|
||||
NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 0, "second socket should not receive it (it is bound specifically to the second interface's address");
|
||||
|
||||
m_receivedPacket->RemoveAllByteTags ();
|
||||
|
||||
Reference in New Issue
Block a user