summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2013-04-04 12:37:02 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-06-28 23:13:37 +0900
commite943f6106804c120d353c0b64620977d73e8ccc6 (patch)
treea8d36fe07abbc9eac8731d4f6372b4318a99ed8a
parent58e86b188cedc105ea89bbb694cf2308197ebb0b (diff)
topology/switches: exception during serialization
Datapath.send_packet_out() requires buffer_id, not dpid. > 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/base/app_manager.py", line 126, in _event_loop > handler(ev) > File "/ryu/topology/switches.py", line 697, in packet_in_handler > self._drop_packet(msg) > File "/ryu/topology/switches.py", line 640, in _drop_packet > dp.send_packet_out(dp.id, msg.in_port, []) > File "/ryu/controller/controller.py", line 242, in send_packet_out > self.send_msg(packet_out) > File "/ryu/controller/controller.py", line 216, in send_msg > msg.serialize() > File "/ryu/ofproto/ofproto_parser.py", line 119, in serialize > self._serialize_body() > File "/ryu/ofproto/ofproto_v1_0_parser.py", line 1987, in _serialize_body > self.buffer_id, self.in_port, self.actions_len) > File "/ryu/ofproto/ofproto_parser.py", line 128, in msg_pack_into > buf += struct.pack(fmt, *args) > error: 'I' format requires 0 <= number <= 4294967295 > <Greenlet at 0x229bd98: <bound method Switches._event_loop of <switches.Switches object at 0x1c8e690>>> failed with error Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/topology/switches.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
index 6e9acda7..892fff6a 100644
--- a/ryu/topology/switches.py
+++ b/ryu/topology/switches.py
@@ -631,13 +631,14 @@ class Switches(app_manager.RyuApp):
@staticmethod
def _drop_packet(msg):
- if msg.buffer_id == 0xffffffff:
+ buffer_id = msg.buffer_id
+ if buffer_id == 0xffffffff:
return # TODO:use constant instead of -1
dp = msg.datapath
# TODO:XXX
if dp.ofproto.OFP_VERSION == ofproto_v1_0.OFP_VERSION:
- dp.send_packet_out(dp.id, msg.in_port, [])
+ dp.send_packet_out(buffer_id, msg.in_port, [])
else:
LOG.error('cannot drop_packet. unsupported version. %x',
dp.ofproto.OFP_VERSION)