diff options
author | Ryo Nakamura <upa@haeena.net> | 2024-02-07 14:34:15 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2024-02-07 15:14:27 +0900 |
commit | b2628b54fb08ff0c91b352c4cfc09923a0896027 (patch) | |
tree | 1c77df426e9636c796e4568ac5cd12114b052a9d /src/ssh.c | |
parent | a9c59f744a29f921ab55518a3b2b5b5c7ca6b95d (diff) |
add -4 and -6 options to use either IPv4 or IPv6
Diffstat (limited to 'src/ssh.c')
-rw-r--r-- | src/ssh.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -27,6 +27,12 @@ static int ssh_set_opts(ssh_session ssh, struct mscp_ssh_opts *opts) return -1; } + if (opts->ai_family && + ssh_options_set(ssh, SSH_OPTIONS_AI_FAMILY, &opts->ai_family) < 0) { + priv_set_errv("failed to set address family"); + return -1; + } + if (opts->identity && ssh_options_set(ssh, SSH_OPTIONS_IDENTITY, opts->identity) < 0) { priv_set_errv("failed to set identity"); |