Signed-off-by: Can Zhang <[email protected]>
---
 ryu/ofproto/ofproto_v1_0_parser.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 180e161..a6d3977 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -1044,6 +1044,7 @@ class NXFlowStats(object):
 
     @classmethod
     def parser(cls, buf, offset):
+        original_offset = offset
         nxflow_stats = cls()
         (nxflow_stats.length, nxflow_stats.table_id,
          nxflow_stats.duration_sec, nxflow_stats.duration_nsec,
@@ -1065,6 +1066,16 @@ class NXFlowStats(object):
             fields.append(field)
         nxflow_stats.fields = fields
 
+        actions = []
+        total_len = original_offset + nxflow_stats.length
+        match_len = nxflow_stats.match_len
+        offset += (match_len + 7) / 8 * 8 - match_len
+        while offset < total_len:
+            action = OFPAction.parser(buf, offset)
+            actions.append(action)
+            offset += action.len
+        nxflow_stats.actions = actions
+
         return nxflow_stats
 
 
-- 
1.7.11.1
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to