With this patch, when failed to negotiate the OpenFlow version with a switch, Ryu will close the socket connecting to the switch after sending a OFPT_ERROR message.
Signed-off-by: IWASE Yusuke <iwase.yusu...@gmail.com> --- ryu/controller/ofp_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/controller/ofp_handler.py b/ryu/controller/ofp_handler.py index 4f439c2..6ab02fe 100644 --- a/ryu/controller/ofp_handler.py +++ b/ryu/controller/ofp_handler.py @@ -65,7 +65,7 @@ class OFPHandler(ryu.base.app_manager.RyuApp): error_msg.type = datapath.ofproto.OFPET_HELLO_FAILED error_msg.code = datapath.ofproto.OFPHFC_INCOMPATIBLE error_msg.data = error_desc - datapath.send_msg(error_msg) + datapath.send_msg(error_msg, close_socket=True) @set_ev_handler(ofp_event.EventOFPHello, HANDSHAKE_DISPATCHER) def hello_handler(self, ev): -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel