From 41ca97b4ccd0ce52a408c2270e04997b3f7e9bb2 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Fri, 30 Oct 2026 05:38:16 +0000 Subject: [PATCH] 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 * Copyright 2002 Markus Friedl @@ -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);