summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/ofproto/ofproto_v1_0_parser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py
index 5ee4e3dd..b0d0e89b 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -144,8 +144,9 @@ class OFPAction(OFPActionHeader):
def parser(cls, buf, offset):
type_, len_ = struct.unpack_from(
ofproto_v1_0.OFP_ACTION_HEADER_PACK_STR, buf, offset)
- offset += ofproto_v1_0.OFP_ACTION_HEADER_SIZE
- return cls.parser(buf, offset)
+ cls_ = cls._ACTION_TYPES.get(type_)
+ assert cls_ is not None
+ return cls_.parser(buf, offset)
@OFPAction.register_action_type(ofproto_v1_0.OFPAT_OUTPUT,