src/flow-monitor/model/ipv4-flow-classifier.cc
changeset 10586 25727ac2504f
parent 10467 c5bf751f8d4e
child 10670 d04c750525d7
--- a/src/flow-monitor/model/ipv4-flow-classifier.cc	Tue Jan 21 23:06:22 2014 +0100
+++ b/src/flow-monitor/model/ipv4-flow-classifier.cc	Thu Jan 23 19:31:42 2014 +0100
@@ -159,11 +159,17 @@
   // if the insertion succeeded, we need to assign this tuple a new flow identifier
   if (insert.second)
     {
-      insert.first->second = GetNewFlowId ();
+      FlowId newFlowId = GetNewFlowId ();
+      insert.first->second = newFlowId;
+      m_flowPktIdMap[newFlowId] = 0;
+    }
+  else
+    {
+      m_flowPktIdMap[insert.first->second] ++;
     }
 
   *out_flowId = insert.first->second;
-  *out_packetId = ipHeader.GetIdentification ();
+  *out_packetId = m_flowPktIdMap[*out_flowId];
 
   return true;
 }