1
0
mirror of https://github.com/clearml/dropbear synced 2025-04-24 08:04:42 +00:00

make sure socket is of the right domain

This commit is contained in:
Matt Johnston 2016-06-19 20:38:38 +08:00
parent 0ee860a011
commit 2c73fd6fbf

View File

@ -61,7 +61,7 @@ static void connect_try_next(struct dropbear_progress_connection *c) {
{
dropbear_assert(c->sock == -1);
c->sock = socket(c->res_iter->ai_family, c->res_iter->ai_socktype, c->res_iter->ai_protocol);
c->sock = socket(r->ai_family, r->ai_socktype, r->ai_protocol);
if (c->sock < 0) {
continue;
}