[patch] ignore SSH2_MSG_IGNORE packets

Markus Friedl Markus.Friedl at informatik.uni-erlangen.de
Sun Jul 22 22:43:09 EST 2001


i think the patch is wrong, because IGNORE messages
are already handled in packet_read_poll().

sshd complains because it gets a protocol v1 ignore message.

-m

On Sun, Jul 22, 2001 at 01:03:21PM +0100, Matthew Vernon wrote:
Content-Description: message body text
> Hi,
> 
> protocolkeepalives sends ssh_msg_ignore, which the ssh2 server handles
> incorrectly (i.e. it produces some output to syslog, instead of
> ignoring the packet):
> 
> Jul  9 11:58:07 ren sshd[16580]: error: Hm, dispatch protocol error:
> type 32 plen 4
> 
> This patch implements a highly advanced function to ignore these
> packets ;)
> 
> Matthew

Content-Description: msg_ignore patch
> --- /tmp/openssh-2.9p2/serverloop.c	Sat Apr 14 00:28:03 2001
> +++ ./serverloop.c	Tue Jul 17 23:36:47 2001
> @@ -741,6 +741,13 @@
>  	channel_stop_listening();
>  }
>  
> +
> +void 
> +server_ignore(int type, int plen, void *ctxt)
> +{
> +  /*We've receive an SSH_MSG_IGNORE packet, so ignore it :) */
> +}
> +
>  void
>  server_input_channel_failure(int type, int plen, void *ctxt)
>  {
> @@ -956,6 +963,7 @@
>  {
>  	debug("server_init_dispatch_20");
>  	dispatch_init(&dispatch_protocol_error);
> +	dispatch_set(SSH2_MSG_IGNORE, &server_ignore);
>  	dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
>  	dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data);
>  	dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof);

Content-Description: .signature
> 
> -- 
> "At least you know where you are with Microsoft."
> "True. I just wish I'd brought a paddle."
> http://www.debian.org




More information about the openssh-unix-dev mailing list