src/internet-node/ipv4-l3-protocol.cc
changeset 3138 44711f06705e
parent 3124 473e59b5e141
child 3153 1433edf49f02
--- a/src/internet-node/ipv4-l3-protocol.cc	Wed May 21 19:00:38 2008 -0700
+++ b/src/internet-node/ipv4-l3-protocol.cc	Wed May 21 22:40:18 2008 -0700
@@ -490,9 +490,7 @@
   // Set TTL to 1 if it is a broadcast packet of any type.  Otherwise,
   // possibly override the default TTL if the packet is tagged
   SocketIpTtlTag tag;
-  bool found = packet->PeekTag (tag);
-  uint8_t socketTtl = tag.GetTtl ();
-  packet->RemoveTag (tag);
+  bool found = packet->FindFirstMatchingTag (tag);
 
   if (destination.IsBroadcast ()) 
     {
@@ -500,7 +498,8 @@
     }
   else if (found)
     {
-      ipHeader.SetTtl (socketTtl);
+      ipHeader.SetTtl (tag.GetTtl ());
+      // XXX remove tag here?  
     }
   else
     {