diff netio.c @ 1076:d92597ef089e

fastopen code was totally broken
author Matt Johnston <matt@ucc.asn.au>
date Tue, 14 Apr 2015 20:43:54 +0800
parents 88043f9d40bd
children b3b772646974
line wrap: on
line diff
--- a/netio.c	Sat Mar 21 22:43:08 2015 +0800
+++ b/netio.c	Tue Apr 14 20:43:54 2015 +0800
@@ -72,7 +72,6 @@
 	int fastopen = 0;
 #ifdef DROPBEAR_TCP_FAST_OPEN
 	struct msghdr message;
-	struct iovec message;
 #endif
 
 	for (r = c->res_iter; r; r = r->ai_next)
@@ -102,9 +101,9 @@
 		if (c->writequeue) {
 			/* 6 is arbitrary, enough to hold initial packets */
 			int iovlen = 6; /* Linux msg_iovlen is a size_t */
-			struct iov[6];
+			struct iovec iov[6];
 			packet_queue_to_iovec(c->writequeue, iov, &iovlen);
-			message.msg_iov = &iov;
+			message.msg_iov = iov;
 			message.msg_iovlen = iovlen;
 			res = sendmsg(c->sock, &message, MSG_FASTOPEN);
 			if (res < 0 && errno != EINPROGRESS) {