From ef5c5e45d3a05f655171a5563f0c07b0a4b77ae8 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 24 Jul 2012 13:27:35 +0900 Subject: of1.2: fix Instruction parser Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_2_parser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3