Remove packet tags before reinjecting the packet into the stack
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu Jun 11 16:12:11 2009 +0100 (8 months ago)
changeset 456286f4abe514d2
parent 4561 2df865ff4369
child 4563 e883e2df59af
Remove packet tags before reinjecting the packet into the stack
examples/virtual-net-device.cc
     1.1 --- a/examples/virtual-net-device.cc	Thu Jun 11 16:02:58 2009 +0100
     1.2 +++ b/examples/virtual-net-device.cc	Thu Jun 11 16:12:11 2009 +0100
     1.3 @@ -103,18 +103,21 @@
     1.4    void N3SocketRecv (Ptr<Socket> socket)
     1.5    {
     1.6      Ptr<Packet> packet = socket->Recv (65535, 0);
     1.7 +    packet->RemoveAllPacketTags ();
     1.8      m_n3Tap->Receive (packet, 0x0800, m_n3Tap->GetAddress (), m_n3Tap->GetAddress (), NetDevice::PACKET_HOST);
     1.9    }
    1.10  
    1.11    void N0SocketRecv (Ptr<Socket> socket)
    1.12    {
    1.13      Ptr<Packet> packet = socket->Recv (65535, 0);
    1.14 +    packet->RemoveAllPacketTags ();
    1.15      m_n0Tap->Receive (packet, 0x0800, m_n0Tap->GetAddress (), m_n0Tap->GetAddress (), NetDevice::PACKET_HOST);
    1.16    }
    1.17  
    1.18    void N1SocketRecv (Ptr<Socket> socket)
    1.19    {
    1.20      Ptr<Packet> packet = socket->Recv (65535, 0);
    1.21 +    packet->RemoveAllPacketTags ();
    1.22      m_n1Tap->Receive (packet, 0x0800, m_n1Tap->GetAddress (), m_n1Tap->GetAddress (), NetDevice::PACKET_HOST);
    1.23    }
    1.24