X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fip.c;h=bf564662d057ac9c93419bfd939a6f4ba052f918;hb=ac4d558b5e07523392bab2b4468b4c9f73745af9;hp=c275b1f00d2a8550065bf06f2c64c2c2d95910db;hpb=a23ff3b4ab81658d0c8107ab01a518e6ca06bd6e;p=exim.git diff --git a/src/src/ip.c b/src/src/ip.c index c275b1f00..bf564662d 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -2,12 +2,12 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2016 */ +/* Copyright (c) University of Cambridge 1995 - 2017 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions for doing things with sockets. With the advent of IPv6 this has got messier, so that it's worth pulling out the code into separate functions -that other parts of Exim can call, expecially as there are now several +that other parts of Exim can call, especially as there are now several different places in the code where sockets are used. */ @@ -303,6 +303,7 @@ int namelen, port; host_item shost; host_item *h; int af = 0, fd, fd4 = -1, fd6 = -1; +BOOL fastopen = tcp_fastopen_ok && type == SOCK_STREAM; shost.next = NULL; shost.address = NULL; @@ -358,7 +359,7 @@ for (h = &shost; h; h = h->next) } for(port = portlo; port <= porthi; port++) - if (ip_connect(fd, af, h->address, port, timeout, type == SOCK_STREAM) == 0) + if (ip_connect(fd, af, h->address, port, timeout, fastopen) == 0) { if (fd != fd6) close(fd6); if (fd != fd4) close(fd4);