[openssh-commits] [openssh] 02/05: upstream: Don't misuse the sftp limits extension's open-handles

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Dec 22 12:51:40 AEDT 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit aaac8c61c18124eb5fb8a2cff1e85dea2db6c147
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Dec 22 01:20:39 2025 +0000

    upstream: Don't misuse the sftp limits extension's open-handles
    
    field. This value is supposed to be the number of handles a server will allow
    to be opened and not a number of outstanding read/write requests that can be
    sent during an upload/download.
    
    ok markus@
    
    OpenBSD-Commit-ID: 14ebb6690acbd488e748ce8ce3302bd7e1e8a5b0
---
 sftp-client.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sftp-client.c b/sftp-client.c
index 840170ab6..21f533090 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.180 2025/09/30 00:10:42 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.181 2025/12/22 01:20:39 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
  *
@@ -571,17 +571,6 @@ sftp_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
 			    (unsigned long long)limits.read_length,
 			    ret->upload_buflen, ret->download_buflen);
 		}
-
-		/* Use the server limit to scale down our value only */
-		if (num_requests == 0 && limits.open_handles) {
-			ret->num_requests =
-			    MINIMUM(DEFAULT_NUM_REQUESTS, limits.open_handles);
-			if (ret->num_requests == 0)
-				ret->num_requests = 1;
-			debug3("server handle limit %llu; using %u",
-			    (unsigned long long)limits.open_handles,
-			    ret->num_requests);
-		}
 	}
 
 	/* Some filexfer v.0 servers don't support large packets */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list