* SSHv2 doesn't actually have compression levels
@ 2019-07-30 1:58 Tobias Geerinckx-Rice
2019-08-22 21:48 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-07-30 1:58 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
Guix,
While reading (guix scripts offload) in a (failed) attempt to get
offloading working, the following comment caught my eye:
;; We rely on protocol-level compression from libssh to optimize
large data
;; transfers. Warn if it's missing.
which means that we're not currently doing our own compression
inside the tunnel.
This is significant, because it means that the COMPRESS-LEVEL
field of BUILD-MACHINE is completely bogus[0], and probably always
was - unless it once supported SSHv1, which I think we can agree
is not something we want to support today. Nobody's offloading
libreoffice to that old router in the attic.
I'd like to undocument the option, and add a comment noting its
lack of any useful effect to the code, by next week.
Kind regards,
T G-R
[0]: Take a look at OpenSSH's readconf.c, packet.c, and all calls
to start_compression_out().
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SSHv2 doesn't actually have compression levels
2019-07-30 1:58 SSHv2 doesn't actually have compression levels Tobias Geerinckx-Rice
@ 2019-08-22 21:48 ` Ludovic Courtès
2019-08-22 22:00 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2019-08-22 21:48 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: guix-devel
Hello,
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> While reading (guix scripts offload) in a (failed) attempt to get
> offloading working, the following comment caught my eye:
>
> ;; We rely on protocol-level compression from libssh to optimize
> large data
> ;; transfers. Warn if it's missing.
>
> which means that we're not currently doing our own compression inside
> the tunnel.
>
> This is significant, because it means that the COMPRESS-LEVEL field of
> BUILD-MACHINE is completely bogus[0], and probably always was - unless
[...]
> [0]: Take a look at OpenSSH's readconf.c, packet.c, and all calls to
> start_compression_out().
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?
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SSHv2 doesn't actually have compression levels
2019-08-22 21:48 ` Ludovic Courtès
@ 2019-08-22 22:00 ` Tobias Geerinckx-Rice
2019-08-23 12:21 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-08-22 22:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
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!
~/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)
packet.c: if ((r = start_compression_out(ssh, 6)) != 0)
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SSHv2 doesn't actually have compression levels
2019-08-22 22:00 ` Tobias Geerinckx-Rice
@ 2019-08-23 12:21 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2019-08-23 12:21 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: guix-devel
Tobias Geerinckx-Rice <me@tobias.gr> 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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-23 12:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-30 1:58 SSHv2 doesn't actually have compression levels Tobias Geerinckx-Rice
2019-08-22 21:48 ` Ludovic Courtès
2019-08-22 22:00 ` Tobias Geerinckx-Rice
2019-08-23 12:21 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.