diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-03-06 15:52:22 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-03-26 22:11:38 +0900 |
commit | 3003d475d268efbff0fa2df56104968e71761ca8 (patch) | |
tree | 2788db8abb8ea59b9c043893e475f043ffc89baf | |
parent | afbc80352cd2ce69291939bacdf5bd5ea6d39eb5 (diff) |
ofp_handler: Close socket when HELLO failed
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.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/controller/ofp_handler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ryu/controller/ofp_handler.py b/ryu/controller/ofp_handler.py index 4f439c2e..6ab02fe8 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): |