Bug 2254 - Ipv[4,6]RawSocket can return the wrong number of bytes sent - revert some changes for Linux compatibility.

This commit is contained in:
Tommaso Pecorella
2016-01-15 18:36:11 +01:00
parent fcf0b6eb98
commit 2adaf7d53e
3 changed files with 3 additions and 2 deletions

View File

@@ -244,6 +244,7 @@ Ipv4RawSocketImpl::SendTo (Ptr<Packet> p, uint32_t flags,
}
else
{
pktSize += header.GetSerializedSize ();
ipv4->SendWithHeader (p, header, route);
}
NotifyDataSent (pktSize);

View File

@@ -128,7 +128,7 @@ Ipv4HeaderTest::DoSendData_IpHdr_Dscp (Ptr<Socket> socket, std::string to, Ipv4H
p->AddHeader (ipHeader);
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (p, 0, realTo),
123, to);
143, to);
socket->SetAttribute ("IpHeaderInclude", BooleanValue (false));
}

View File

@@ -140,7 +140,7 @@ Ipv4RawSocketImplTest::DoSendData_IpHdr (Ptr<Socket> socket, std::string to)
p->AddHeader (ipHeader);
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (p, 0, realTo),
123, to);
143, to);
socket->SetAttribute ("IpHeaderInclude", BooleanValue (false));
}