From 4bd7c5026cbec97d27971f02e282d428d1d997be Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 5 Mar 2012 09:34:05 +0700 Subject: [PATCH] Increment offset in OFPFlowStats.parser() After reading the third portion of the header the offset needs to be incremented as it is used to parse actions later on in the function. Signed-off-by: Simon Horman Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_0_parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py index 68466651..5ee4e3dd 100644 --- a/ryu/ofproto/ofproto_v1_0_parser.py +++ b/ryu/ofproto/ofproto_v1_0_parser.py @@ -397,6 +397,7 @@ class OFPFlowStats(object): flow_stats.packet_count, flow_stats.byte_conunt) = struct.unpack_from( ofproto_v1_0.OFP_FLOW_STATS_1_PACK_STR, buf, offset) + offset += ofproto_v1_0.OFP_FLOW_STATS_1_SIZE flow_stats.actions = [] length = ofproto_v1_0.OFP_FLOW_STATS_SIZE