mirror of
https://github.com/upa/mscp.git
synced 2026-02-14 09:14:47 +08:00
add -4 and -6 options to use either IPv4 or IPv6
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user