=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.567 retrieving revision 1.568 diff -u -r1.567 -r1.568 --- src/usr.bin/ssh/ssh.c 2021/09/10 10:26:02 1.567 +++ src/usr.bin/ssh/ssh.c 2021/09/15 06:56:01 1.568 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.567 2021/09/10 10:26:02 dtucker Exp $ */ +/* $OpenBSD: ssh.c,v 1.568 2021/09/15 06:56:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -243,6 +243,7 @@ port = default_ssh_port(); if (cname != NULL) *cname = '\0'; + debug3_f("lookup %s:%d", name, port); snprintf(strport, sizeof strport, "%d", port); memset(&hints, 0, sizeof(hints)); @@ -366,7 +367,7 @@ int i; struct allowed_cname *rule; - if (*cname == '\0' || options.num_permitted_cnames == 0 || + if (*cname == '\0' || !config_has_permitted_cnames(&options) || strcmp(*namep, cname) == 0) return 0; if (options.canonicalize_hostname == SSH_CANONICALISE_NO) @@ -1165,7 +1166,7 @@ */ direct = option_clear_or_none(options.proxy_command) && options.jump_host == NULL; - if (addrs == NULL && options.num_permitted_cnames != 0 && (direct || + if (addrs == NULL && config_has_permitted_cnames(&options) && (direct || options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { if ((addrs = resolve_host(host, options.port, direct, cname, sizeof(cname))) == NULL) {