0xffffffff == -1 as uint32_t.
However python integer representation isn't sized integer.
So assert buffer_id == -1 doesn't hold. use 0xffffffff explicitly instead
of -1.

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/gevent/greenlet.py", line 390, in run
    result = self._run(*self.args, **self.kwargs)
  File "/ryu/bin/ryu/app/discovery.py", line 421, in lldp_loop
    self.send_lldp_packet(dp, port_no)
  File "/ryu/bin/ryu/app/discovery.py", line 390, in send_lldp_packet
    dp.send_packet_out(actions=actions, data=port_data.data)
  File "/ryu/bin/ryu/controller/controller.py", line 211, in send_packet_out
    self.send_msg(packet_out)
  File "/ryu/bin/ryu/controller/controller.py", line 181, in send_msg
    self.serialize_msg(msg)
  File "/ryu/bin/ryu/controller/controller.py", line 178, in serialize_msg
    msg.serialize()
  File "/ryu/bin/ryu/ofproto/ofproto_parser.py", line 119, in serialize
    self._serialize_body()
  File "/ryu/bin/ryu/ofproto/ofproto_v1_0_parser.py", line 1210, in 
_serialize_body
    assert self.buffer_id == -1
AssertionError

Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/ofproto/ofproto_v1_0_parser.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 693d873..0bd91c3 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -1155,7 +1155,7 @@ class OFPPacketOut(MsgBase):
             self.actions_len += a.len
 
         if self.data is not None:
-            assert self.buffer_id == -1
+            assert self.buffer_id == 0xffffffff
             self.buf += self.data
 
         msg_pack_into(ofproto_v1_0.OFP_PACKET_OUT_PACK_STR,
-- 
1.7.1.1


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to