summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-26 23:43:12 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-26 23:43:12 +0800
commit2a90c1ca7ed415811b2e063e7c62e15cdc7b2a4b (patch)
tree26b555d89a414f1ec10c9a1a6a539b83e3a5bda8
parent46845fd3e8fb121ccba6a51510063935f03d8225 (diff)
ignore any sendmsg() errors
--HG-- branch : fastopen
-rw-r--r--netio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/netio.c b/netio.c
index 5b97e4d..d1a05f3 100644
--- a/netio.c
+++ b/netio.c
@@ -103,8 +103,10 @@ static void connect_try_next(struct dropbear_progress_connection *c) {
message.msg_iov = packet_queue_to_iovec(c->writequeue, &iovlen);
message.msg_iovlen = iovlen;
res = sendmsg(c->sock, &message, MSG_FASTOPEN);
- if (res < 0 && errno == EOPNOTSUPP) {
- TRACE(("Fastopen not supported"));
+ if (res < 0) {
+ /* Not entirely sure which kind of errors are normal - 2.6.32 seems to
+ return EPIPE for any (nonblocking?) sendmsg(). just fall back */
+ TRACE(("sendmsg tcp_fastopen failed, falling back. %s", strerror(errno)));
/* No kernel MSG_FASTOPEN support. Fall back below */
fastopen = 0;
/* Set to NULL to avoid trying again */