Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/controller/controller.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 66d50a3..d6bc3de 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -315,6 +315,9 @@ def datapath_connection_factory(socket, address):
# Especially malicious switch can send malformed packet,
# the parser raise exception.
# Can we do anything more graceful?
- LOG.error("Error in the datapath %s from %s",
- dpid_to_str(datapath.id), address)
+ if datapath.id is None:
+ dpid_str = "%s" % datapath.id
+ else:
+ dpid_str = dpid_to_str(datapath.id)
+ LOG.error("Error in the datapath %s from %s", dpid_str, address)
raise
--
1.8.1.5
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel