Skip to content

Commit

Permalink
rtrlib/transport: fix ssh transport
Browse files Browse the repository at this point in the history
Currently the ssh transport will never connect successfully because
unless a bindaddr is specified.
This also fixes hostkey verification.
  • Loading branch information
mroethke authored and smlng committed Feb 6, 2019
1 parent 598d1fe commit ef8930d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtrlib/transport/ssh/ssh_transport.c
Expand Up @@ -231,14 +231,14 @@ RTRLIB_EXPORT int tr_ssh_init(const struct tr_ssh_config *config, struct tr_sock
ssh_socket->config.bindaddr = NULL;
}

if (config->bindaddr) {
if (config->client_privkey_path) {
ssh_socket->config.client_privkey_path =
lrtr_strdup(config->client_privkey_path);
} else {
ssh_socket->config.client_privkey_path = NULL;
}

if (config->bindaddr) {
if (config->server_hostkey_path) {
ssh_socket->config.server_hostkey_path =
lrtr_strdup(config->server_hostkey_path);
} else {
Expand Down

0 comments on commit ef8930d

Please sign in to comment.