update pyloxi to floodlight/loxigen-artifacts @ f9dd10108ee6f7f770b4433e23eaf875a8abf1df
diff --git a/src/python/loxi/of12/instruction.py b/src/python/loxi/of12/instruction.py
index 06786ed..915035d 100644
--- a/src/python/loxi/of12/instruction.py
+++ b/src/python/loxi/of12/instruction.py
@@ -48,7 +48,7 @@
obj.type = reader.read("!H")[0]
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -93,7 +93,7 @@
assert(_type == 4)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
return obj
@@ -137,7 +137,7 @@
assert(_type == 5)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -193,7 +193,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.experimenter = reader.read("!L")[0]
obj.data = str(reader.read_all())
return obj
@@ -243,7 +243,7 @@
assert(_type == 1)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.table_id = reader.read("!B")[0]
reader.skip(3)
return obj
@@ -292,7 +292,7 @@
assert(_type == 3)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
return obj
@@ -346,7 +346,7 @@
assert(_type == 2)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
obj.metadata = reader.read("!Q")[0]
obj.metadata_mask = reader.read("!Q")[0]