[openssh-commits] [openssh] 51/87: upstream: used cached hostname for `Match host` when UseDNS=yes;

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 30 20:21:28 AEDT 2026


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

djm pushed a commit to branch master
in repository openssh.

commit 41ca97b4ccd0ce52a408c2270e04997b3f7e9bb2
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Oct 30 05:38:16 2026 +0000

    upstream: used cached hostname for `Match host` when UseDNS=yes;
    
    avoids multiple lookups for same host and a different number of lookups when
    the user exists vs not.
    
    Anthropic ANT-2026-14BFHJ3R
    
    OpenBSD-Commit-ID: 1a4b7cedcc2ccdb24eac9a1455f7c26b0437d442
---
 monitor_wrap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/monitor_wrap.c b/monitor_wrap.c
index 46e73bba2..457a6196f 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.152 2026/10/30 02:31:36 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.153 2026/10/30 05:38:16 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos at citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus at openbsd.org>
@@ -1211,7 +1211,7 @@ server_get_connection_info(struct ssh *ssh, int populate, int use_dns)
 
 	if (ssh == NULL || !populate)
 		return &ci;
-	ci.host = use_dns ? ssh_remote_hostname(ssh) : ssh_remote_ipaddr(ssh);
+	ci.host = auth_get_canonical_hostname(ssh, use_dns);
 	ci.address = ssh_remote_ipaddr(ssh);
 	ci.laddress = ssh_local_ipaddr(ssh);
 	ci.lport = ssh_local_port(ssh);

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


More information about the openssh-commits mailing list