Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/ofproto/ofproto_v1_2_parser.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py
b/ryu/ofproto/ofproto_v1_2_parser.py
index e97a1af..5954cc1 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -376,8 +376,7 @@ class OFPPortStatus(MsgBase):
@_set_msg_type(ofproto_v1_2.OFPT_PACKET_OUT)
class OFPPacketOut(MsgBase):
def __init__(self, datapath, buffer_id=None, in_port=None, actions=None,
- data=None):
-
+ data=None, actions_len=None):
# The in_port field is the ingress port that must be associated
# with the packet for OpenFlow processing.
assert in_port is not None
@@ -385,17 +384,17 @@ class OFPPacketOut(MsgBase):
super(OFPPacketOut, self).__init__(datapath)
self.buffer_id = buffer_id
self.in_port = in_port
- self._actions_len = 0
+ self.actions_len = 0
self.actions = actions
self.data = data
def _serialize_body(self):
- self._actions_len = 0
+ self.actions_len = 0
offset = ofproto_v1_2.OFP_PACKET_OUT_SIZE
for a in self.actions:
a.serialize(self.buf, offset)
offset += a.len
- self._actions_len += a.len
+ self.actions_len += a.len
if self.data is not None:
assert self.buffer_id == 0xffffffff
@@ -403,7 +402,7 @@ class OFPPacketOut(MsgBase):
msg_pack_into(ofproto_v1_2.OFP_PACKET_OUT_PACK_STR,
self.buf, ofproto_v1_2.OFP_HEADER_SIZE,
- self.buffer_id, self.in_port, self._actions_len)
+ self.buffer_id, self.in_port, self.actions_len)
@_set_msg_type(ofproto_v1_2.OFPT_FLOW_MOD)
--
1.8.3.1
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel