diff netio.c @ 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 57d09741d46d
children 2c9dac2d6707 78b7e0634117
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;
 		}