guix-devel
[Top][All Lists]
Advanced

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

Re: SSHv2 doesn't actually have compression levels


From: Ludovic Courtès
Subject: Re: SSHv2 doesn't actually have compression levels
Date: Fri, 23 Aug 2019 14:21:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Tobias Geerinckx-Rice <address@hidden> skribis:

> Ludo',
>
> Welcome back :-)
>
> Ludovic Courtès 写道:
>> I don’t get it: the ‘compression-level’ field defaults to 3, and
>> OpenSSH
>> does:
>>
>>   static int
>>   start_compression_out(struct ssh *ssh, int level)
>>   {
>>           if (level < 1 || level > 9)
>>                   return SSH_ERR_INVALID_ARGUMENT;
>>           debug("Enabling compression at level %d.", level);
>>
>>   [...]
>>
>>   }
>>
>> What’s wrong?
>
> Exactly!

Exactly what?  :-)

>  ~/openssh-8.0p1 λ grep -r start_compression_out
>  packet.c:start_compression_out(struct ssh *ssh, int level)
>  packet.c:    if ((r = start_compression_out(ssh, 6)) != 0)

libssh (which is what ‘guix offload’ uses) appears to honor the
user-provided compression level:

--8<---------------cut here---------------start------------->8---
int compress_buffer(ssh_session session, ssh_buffer buf) {
  ssh_buffer dest = NULL;

  dest = gzip_compress(session, buf, session->opts.compressionlevel);
--8<---------------cut here---------------end--------------->8---

Apologies if I’m missing the obvious!

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]