From da26715d80845d9aef21dbed61853c629a195663 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 12 Jul 2012 08:46:43 +0900 Subject: [PATCH] of1.2: fix OFPPacketIn parser We need two bytes padding right after the match. Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_2_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py index 02ea4218..b456de33 100644 --- a/ryu/ofproto/ofproto_v1_2_parser.py +++ b/ryu/ofproto/ofproto_v1_2_parser.py @@ -240,7 +240,7 @@ class OFPPacketIn(MsgBase): match_len = utils.round_up(msg.match.length, 8) msg.data = msg.buf[(ofproto_v1_2.OFP_PACKET_IN_SIZE - - ofproto_v1_2.OFP_MATCH_SIZE + match_len):] + ofproto_v1_2.OFP_MATCH_SIZE + match_len + 2):] if msg.total_len < len(msg.data): # discard padding for 8-byte alignment of OFP packet