version 1.567, 2021/09/10 10:26:02 |
version 1.568, 2021/09/15 06:56:01 |
|
|
port = default_ssh_port(); |
port = default_ssh_port(); |
if (cname != NULL) |
if (cname != NULL) |
*cname = '\0'; |
*cname = '\0'; |
|
debug3_f("lookup %s:%d", name, port); |
|
|
snprintf(strport, sizeof strport, "%d", port); |
snprintf(strport, sizeof strport, "%d", port); |
memset(&hints, 0, sizeof(hints)); |
memset(&hints, 0, sizeof(hints)); |
|
|
int i; |
int i; |
struct allowed_cname *rule; |
struct allowed_cname *rule; |
|
|
if (*cname == '\0' || options.num_permitted_cnames == 0 || |
if (*cname == '\0' || !config_has_permitted_cnames(&options) || |
strcmp(*namep, cname) == 0) |
strcmp(*namep, cname) == 0) |
return 0; |
return 0; |
if (options.canonicalize_hostname == SSH_CANONICALISE_NO) |
if (options.canonicalize_hostname == SSH_CANONICALISE_NO) |
|
|
*/ |
*/ |
direct = option_clear_or_none(options.proxy_command) && |
direct = option_clear_or_none(options.proxy_command) && |
options.jump_host == NULL; |
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)) { |
options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { |
if ((addrs = resolve_host(host, options.port, |
if ((addrs = resolve_host(host, options.port, |
direct, cname, sizeof(cname))) == NULL) { |
direct, cname, sizeof(cname))) == NULL) { |