Remove packet tags before reinjecting the packet into the stack
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 11 Jun 2009 16:12:11 +0100
changeset 4547 86f4abe514d2
parent 4546 2df865ff4369
child 4548 e883e2df59af
Remove packet tags before reinjecting the packet into the stack
examples/virtual-net-device.cc
--- a/examples/virtual-net-device.cc	Thu Jun 11 16:02:58 2009 +0100
+++ b/examples/virtual-net-device.cc	Thu Jun 11 16:12:11 2009 +0100
@@ -103,18 +103,21 @@
   void N3SocketRecv (Ptr<Socket> socket)
   {
     Ptr<Packet> packet = socket->Recv (65535, 0);
+    packet->RemoveAllPacketTags ();
     m_n3Tap->Receive (packet, 0x0800, m_n3Tap->GetAddress (), m_n3Tap->GetAddress (), NetDevice::PACKET_HOST);
   }
 
   void N0SocketRecv (Ptr<Socket> socket)
   {
     Ptr<Packet> packet = socket->Recv (65535, 0);
+    packet->RemoveAllPacketTags ();
     m_n0Tap->Receive (packet, 0x0800, m_n0Tap->GetAddress (), m_n0Tap->GetAddress (), NetDevice::PACKET_HOST);
   }
 
   void N1SocketRecv (Ptr<Socket> socket)
   {
     Ptr<Packet> packet = socket->Recv (65535, 0);
+    packet->RemoveAllPacketTags ();
     m_n1Tap->Receive (packet, 0x0800, m_n1Tap->GetAddress (), m_n1Tap->GetAddress (), NetDevice::PACKET_HOST);
   }