changeset 1309:3b624ad2dc5e

make sure socket is of the right domain
author Matt Johnston <matt@ucc.asn.au>
date Sun, 19 Jun 2016 20:38:38 +0800
parents 8678e2cc1e53
children 090033317ca1
files netio.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/netio.c	Tue Jul 12 23:33:15 2016 +0800
+++ b/netio.c	Sun Jun 19 20:38:38 2016 +0800
@@ -61,7 +61,7 @@
 	{
 		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;
 		}