diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-06-28 20:23:02 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-06-30 11:01:29 +0900 |
commit | f4df6174b2621dc8206c78028ad09232939bc78c (patch) | |
tree | bb12c17df5dbd5c5331757e8a263f04895023e4f | |
parent | 1262ead05ce575328799da217866a8f38a26ed3e (diff) |
of1.2: fix bugs
- typo in OFPQueueGetConfigRequest
- OFPFlowRemoved offset
- OFPActionDecMplsTtl and OFPActionDecNwTtl parsers
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_2_parser.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py index 7710be36..bcf48b62 100644 --- a/ryu/ofproto/ofproto_v1_2_parser.py +++ b/ryu/ofproto/ofproto_v1_2_parser.py @@ -266,7 +266,7 @@ class OFPFlowRemoved(MsgBase): msg.byte_count) = struct.unpack_from( ofproto_v1_2.OFP_FLOW_REMOVED_PACK_STR0, msg.buf, - ofproto_v1_2.OFP_HEADER_SIZE + ofproto_v1_2.OFP_MATCH_SIZE) + ofproto_v1_2.OFP_HEADER_SIZE) offset = (ofproto_v1_2.OFP_FLOW_REMOVED_SIZE - ofproto_v1_2.OFP_MATCH_SIZE) @@ -531,7 +531,8 @@ class OFPActionDecMplsTtl(OFPAction): @classmethod def parser(cls, buf, offset): - msg_pack_into(ofproto_v1_2.OFP_ACTION_HEADER_PACK_STR, buf, offset) + (type_, len_) = struct.unpack_from( + ofproto_v1_2.OFP_ACTION_HEADER_PACK_STR, buf, offset) return cls() @@ -561,7 +562,8 @@ class OFPActionDecNwTtl(OFPAction): @classmethod def parser(cls, buf, offset): - msg_pack_into(ofproto_v1_2.OFP_ACTION_HEADER_PACK_STR, buf, offset) + (type_, len_) = struct.unpack_from( + ofproto_v1_2.OFP_ACTION_HEADER_PACK_STR, buf, offset) return cls() @@ -1162,7 +1164,7 @@ class OFPQueueGetConfigRequest(MsgBase): super(OFPQueueGetConfigRequest, self).__init__(datapath) self.port = port - def _serialized_body(self): + def _serialize_body(self): msg_pack_into(ofproto_v1_2.OFP_QUEUE_GET_CONFIG_REQUEST_PACK_STR, self.buf, ofproto_v1_2.OFP_HEADER_SIZE, self.port) |