[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] server kex: enable delayed compression


On Saturday 02 November 2013 22:30:35 you wrote:
> The code is careful to reenable compression when rekeying.
> 

Thanks for your contribution. I've added brackets to your patch and pushed it. 
I hope that's fine with you.

> Signed-off-by: Nicolas Viennot <nicolas@xxxxxxxxxxx>
> ---
>  src/wrapper.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/src/wrapper.c b/src/wrapper.c
> index 485f145..dc2e7db 100644
> --- a/src/wrapper.c
> +++ b/src/wrapper.c
> @@ -317,8 +317,12 @@ int crypt_set_algorithms_server(ssh_session session){
>          session->next_crypto->do_compress_in=1;
>      }
>      if(strcmp(method,"zlib@xxxxxxxxxxx") == 0){
> -        ssh_set_error(session,SSH_FATAL,"zlib@xxxxxxxxxxx not supported");
> -        return SSH_ERROR;
> +        SSH_LOG(SSH_LOG_PACKET,"enabling C->S delayed compression");
> +
> +        if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED)
> +                session->next_crypto->do_compress_in=1;
> +        else
> +                session->next_crypto->delayed_compress_in=1;
>      }
> 
>      method = session->next_crypto->kex_methods[SSH_COMP_S_C];
> @@ -327,8 +331,12 @@ int crypt_set_algorithms_server(ssh_session session){
>          session->next_crypto->do_compress_out=1;
>      }
>      if(strcmp(method,"zlib@xxxxxxxxxxx") == 0){
> -        ssh_set_error(session,SSH_FATAL,"zlib@xxxxxxxxxxx not supported");
> -        return SSH_ERROR;
> +        SSH_LOG(SSH_LOG_PACKET,"enabling S->C delayed compression\n");
> +
> +        if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED)
> +                session->next_crypto->do_compress_out=1;
> +        else
> +                session->next_crypto->delayed_compress_out=1;
>      }
> 
>      method = session->next_crypto->kex_methods[SSH_HOSTKEYS];



References:
[PATCH] server kex: enable delayed compressionNicolas Viennot <nicolas@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org