summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-07-24 13:27:35 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-07-24 15:19:47 +0900
commitef5c5e45d3a05f655171a5563f0c07b0a4b77ae8 (patch)
treeab2ac18fdd39fc7b6d3653b5f81bcc15ce685942
parenta7eb8c4254272ea6d4274353c2713813c1398e07 (diff)
of1.2: fix Instruction parser
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_2_parser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py
index 71288534..a3569038 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -448,6 +448,7 @@ class OFPInstructionActions(object):
a = OFPAction.parser(buf, offset)
actions.append(a)
actions_len -= a.len
+ offset += a.len
inst = cls(type_, actions)
inst.len = len_
@@ -991,13 +992,16 @@ class OFPFlowStats(object):
inst_length = (length - (ofproto_v1_2.OFP_FLOW_STATS_SIZE -
ofproto_v1_2.OFP_MATCH_SIZE + match_length))
offset += match_length
+ instructions = []
while inst_length > 0:
inst = OFPInstruction.parser(buf, offset)
+ instructions.append(inst)
+ offset += inst.len
inst_length -= inst.len
return cls(length, table_id, duration_sec, duration_nsec, priority,
idle_timeout, hard_timeout, cookie, packet_count,
- byte_count, match)
+ byte_count, match, instructions)
@_set_msg_type(ofproto_v1_2.OFPT_STATS_REQUEST)