Permalink
Browse files

rtrlib/transport: fix ssh transport

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 5, 2019
1 parent 598d1fe commit ef8930d0a877dfa159b05e709486a518ece40272
Showing with 2 additions and 2 deletions.
  1. +2 −2 rtrlib/transport/ssh/ssh_transport.c
@@ -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 {

0 comments on commit ef8930d

Please sign in to comment.