terminate on re-key request (patch)

Marko Asplund aspa at kronodoc.fi
Sat Feb 17 21:25:48 EST 2001


			hi

here's a small patch for making OpenSSH v2.3.0p1 client gracefully
terminate the SSH2 connection when it receives a key re-exchange request
from the server. the patch has been tested against SSH's v2.3.0 server on
linux.

-- 
	aspa

-------------- next part --------------
*** clientloop.c.orig	Sat Feb 17 12:09:21 2001
--- clientloop.c	Sat Feb 17 11:58:45 2001
***************
*** 1016,1021 ****
--- 1016,1029 ----
  	quit_pending = 1;
  }
  
+ void
+ client_rekey_request(int type, int plen, void *ctxt)
+ {
+   quit_pending = 1;
+   debug("re-key request received from server. terminating.");
+   return;
+ }
+ 
  /* XXXX move to generic input handler */
  void
  client_input_channel_open(int type, int plen, void *ctxt)
***************
*** 1097,1102 ****
--- 1105,1112 ----
  	dispatch_set(SSH2_MSG_CHANNEL_OPEN_FAILURE, &channel_input_open_failure);
  	dispatch_set(SSH2_MSG_CHANNEL_REQUEST, &channel_input_channel_request);
  	dispatch_set(SSH2_MSG_CHANNEL_WINDOW_ADJUST, &channel_input_window_adjust);
+ 	dispatch_set(SSH2_MSG_KEXINIT, &client_rekey_request);
+ 
  }
  void
  client_init_dispatch_13()


More information about the openssh-unix-dev mailing list