[patch] Fix incoming compression statistics

Christoph Biedl debian.axhn at manchmal.in-ulm.de
Mon Jun 5 21:30:00 AEST 2017


Hello,

somewhere between 6.7 and 7.4, the compression statistics shown when
running the client with -C -v got messed up. For the incoming
compression, the numbers for outgoing are used, reversed.

This got reported in https://bugs.debian.org/797964 but appearently
was never forwarded upstream. Trivial patch below, kudos to Russell Coker.

    Christoph

--- openssh-7.2p2.orig/packet.c
+++ openssh-7.2p2/packet.c
@@ -525,7 +525,7 @@ ssh_packet_close(struct ssh *ssh)
 				deflateEnd(stream);
 		}
 		if (state->compression_in_started) {
-			z_streamp stream = &state->compression_out_stream;
+			z_streamp stream = &state->compression_in_stream;
 			debug("compress incoming: "
 			    "raw data %llu, compressed %llu, factor %.2f",
 			    (unsigned long long)stream->total_out,


More information about the openssh-unix-dev mailing list