mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
options: Fix setting the port.
Make sure we correctly read the port from the config file.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit bb18442fe8
)
This commit is contained in:
@@ -245,7 +245,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
||||
}
|
||||
break;
|
||||
case SOC_PORT:
|
||||
if (session->opts.port == 22) {
|
||||
if (session->opts.port == 0) {
|
||||
p = ssh_config_get_str_tok(&s, NULL);
|
||||
if (p && *parsing) {
|
||||
ssh_options_set(session, SSH_OPTIONS_PORT_STR, p);
|
||||
|
Reference in New Issue
Block a user