Skip to content

Commit d679bfe

Browse files
committedOct 9, 2020
fastopen now only enabled in https by default. added TCPFastOpen and ListenQueue config options
1 parent eda1403 commit d679bfe

12 files changed

+117
-52
lines changed
 

‎Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
CC = gcc
22
CFLAGS = -g -O2
33
CPPFLAGS =
4-
LIBS = -lcrypt -lcrypto -lssl -lpam -lcap -lz libUseful/libUseful.a
4+
LIBS = -lcrypt -lcrypto -lssl -lpam -lcap -lc -lc -lz libUseful/libUseful.a
55
INSTALL=/bin/install -c
66
prefix=/usr/local
77
exec_prefix=${prefix}
88
bindir=${exec_prefix}/sbin
99
sysconfdir=${prefix}/etc
10-
FLAGS=$(CFLAGS) $(CPPFLAGS) -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCAP=1 -DUSE_LINUX_CAPABILITIES=1 -DHAVE_LIBPAM=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPT=1 -DHAVE_SHADOW_H=1
10+
FLAGS=$(CFLAGS) $(CPPFLAGS) -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBC=1 -DHAVE_LIBC=1 -DUSE_UNSHARE=1 -DUSE_PRCTL=1 -DHAVE_LIBCAP=1 -DUSE_LINUX_CAPABILITIES=1 -DHAVE_LIBPAM=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPT=1 -DHAVE_SHADOW_H=1
1111
OBJ=auth_access_token.o Authenticate.o auth_client_certificate.o auth_alaya_native.o auth_unix.o auth_pam.o MimeType.o DavProps.o Settings.o common.o server.o cgi.o FileProperties.o tar.o directory_listing.o FileDetailsPage.o VPath.o ChrootHelper.o UserAdminScreen.o Events.o ID3.o upload.o proxy.o websocket.o icecast.o xssi.o libUseful/libUseful.a
1212
EXE=alaya
1313

‎README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,20 @@ CustomHeader=<full HTTP header> Custom HTTP header to be added to all server r
169169
LookupClientName If present then lookup client hostnames with DNS and use in logging. The default is just to log the ip-address, as this is faster.
170170
SanitizeAllowTags=<tag list> List of HTML tags allowed to be used in 'POST' to cgi-scripts. If left blank, then all are allowed, if set, then all but the listed html elements will be stripped
171171
UserAgentSettings=UserAgentString,Settings Settings to be applied when a particular user agent string is seen.
172-
FileCacheTime=<seconds> Amount of time to recommend the browser caches documents for.
173-
HttpKeepAlive=<yes|no> Use http keep-alive
174-
ReusePort=<yes|no> Bind server socket with SO_REUSEPORT allowing multiple server processes to bind to the same port (on by default).
175-
UseNamespaces=<yes|no> Use linux namespaces to isolate the connection-handler processes (on by default).
176-
177-
MaxMemory=<max bytes> Maximum amount of memory per alaya process. A suffix can be used to express the size as, for instance, 1G, 2M, 900k
178-
MaxStack=<max bytes> Maximum Stack Size. A suffix can be used to express the size as, for instance, 1G, 2M, 900k
179-
PackFormats=<list> List of 'pack formats' to offer in the 'download as packed' item on the directory page.
172+
FileCacheTime=<seconds> Amount of time to recommend the browser caches documents for.
173+
ListenQueue=<num> Number of connections to queue waiting for 'accept'. Default is 10.
174+
HttpKeepAlive=<yes|no> Use http keep-alive
175+
ReusePort=<yes|no> Bind server socket with SO_REUSEPORT allowing multiple server processes to bind to the same port (on by default).
176+
UseNamespaces=<yes|no> Use linux namespaces to isolate the connection-handler processes (on by default).
177+
TcpFastOpen=<https|yes|no> Use 'tcp fast open'. 'https' only enables this in for encrypted channels, which is the default due to some security concerns.
178+
179+
MaxMemory=<max bytes> Maximum amount of memory per alaya process. A suffix can be used to express the size as, for instance, 1G, 2M, 900k
180+
MaxStack=<max bytes> Maximum Stack Size. A suffix can be used to express the size as, for instance, 1G, 2M, 900k
181+
PackFormats=<list> List of 'pack formats' to offer in the 'download as packed' item on the directory page.
180182
WebsocketHandler:<path>:<protocol>=<script path> Specify a program that handles websockets requests to a particular path and protocol.
181-
DenyProxy=<host>:<port> Configuration for proxy systems, see 'PROXY' section below
183+
DenyProxy=<host>:<port> Configuration for proxy systems, see 'PROXY' section below
182184
AllowProxy=<host>:<port> [redirect=<host>:<port>] [ssl] Configuration for proxy systems, see 'PROXY' section below
185+
183186
```
184187

185188

‎Settings.c

+15-3
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ void ParseConfigItem(const char *ConfigLine)
164164
{
165165
const char *ConfTokens[]={"include","Chroot","Chhome","AllowUsers","DenyUsers","Port","LogFile","AuthPath","BindAddress","LogPasswords","HttpMethods","AuthMethods","DefaultUser","DefaultGroup","Path","FileType","LogVerbose","AuthRealm","Compression","DirListType","DisplayNameLen","MaxLogSize","ScriptHandler","ScriptHashFile","WebsocketHandler","LookupClientName","SanitizeAllowTags","CustomHeader","UserAgentSettings",
166166
"SSLKey","SSLCert","SSLCiphers","SSLDHParams","SSLClientCertificate","SSLVerifyPath", "SSLVersion",
167-
"Event","FileCacheTime","HttpKeepAlive","AccessTokenKey","Timezone","MaxMemory","MaxStack","ActivityTimeout","PackFormats","Admin","AllowProxy", "DenyProxy", "UseNamespaces", "ReusePort",
167+
"Event","FileCacheTime","HttpKeepAlive","AccessTokenKey","Timezone","MaxMemory","MaxStack","ActivityTimeout","PackFormats","Admin","AllowProxy", "DenyProxy", "UseNamespaces", "ReusePort", "TCPFastOpen","ListenQueue",
168168
NULL};
169169
typedef enum {CT_INCLUDE,CT_CHROOT, CT_CHHOME, CT_ALLOWUSERS,CT_DENYUSERS,CT_PORT, CT_LOGFILE,CT_AUTHFILE,CT_BINDADDRESS,CT_LOGPASSWORDS,CT_HTTPMETHODS, CT_AUTHMETHODS,CT_DEFAULTUSER, CT_DEFAULTGROUP, CT_PATH, CT_FILETYPE, CT_LOG_VERBOSE, CT_AUTH_REALM, CT_COMPRESSION, CT_DIRTYPE, CT_DISPLAYNAMELEN, CT_MAXLOGSIZE, CT_SCRIPTHANDLER, CT_SCRIPTHASHFILE, CT_WEBSOCKETHANDLER, CT_LOOKUPCLIENT, CT_SANITIZEALLOW, CT_CUSTOMHEADER, CT_USERAGENTSETTINGS,
170170
CT_SSLKEY, CT_SSLCERT, CT_SSLCIPHERS, CT_SSLDHPARAMS, CT_CLIENT_CERTIFICATION, CT_SSLVERIFY_PATH, CT_SSL_VERSION,
171-
CT_EVENT, CT_FILE_CACHE_TIME, CT_SESSION_KEEPALIVE, CT_ACCESS_TOKEN_KEY, CT_TIMEZONE, CT_MAX_MEM, CT_MAX_STACK, CT_ACTIVITY_TIMEOUT, CT_ARCHIVE_FORMATS, CT_ADMIN, CT_ALLOWPROXY, CT_DENYPROXY, CT_USE_NAMESPACES, CT_REUSE_PORT} TConfigTokens;
171+
CT_EVENT, CT_FILE_CACHE_TIME, CT_SESSION_KEEPALIVE, CT_ACCESS_TOKEN_KEY, CT_TIMEZONE, CT_MAX_MEM, CT_MAX_STACK, CT_ACTIVITY_TIMEOUT, CT_ARCHIVE_FORMATS, CT_ADMIN, CT_ALLOWPROXY, CT_DENYPROXY, CT_USE_NAMESPACES, CT_REUSE_PORT, CT_FAST_OPEN, CT_LISTEN_QUEUE} TConfigTokens;
172172

173173
char *Token=NULL;
174174
const char *ptr;
@@ -408,6 +408,10 @@ switch(TokType)
408408
Settings.ActivityTimeout=atoi(ptr);
409409
break;
410410

411+
case CT_LISTEN_QUEUE:
412+
Settings.ListenQueueLen=atoi(ptr);
413+
break;
414+
411415
case CT_ARCHIVE_FORMATS:
412416
Settings.PackFormats=ParsePackFormats(Settings.PackFormats, ptr);
413417
break;
@@ -433,6 +437,13 @@ switch(TokType)
433437
if (strtobool(ptr)) Settings.Flags |= FLAG_USE_REUSEPORT;
434438
else Settings.Flags &= ~FLAG_USE_REUSEPORT;
435439
break;
440+
441+
case CT_FAST_OPEN:
442+
if (strcasecmp(ptr, "https")==0) Settings.Flags |= FLAG_USE_HTTPS_FASTOPEN;
443+
else if (strtobool(ptr)) Settings.Flags |= FLAG_USE_FASTOPEN;
444+
else Settings.Flags &= ~(FLAG_USE_FASTOPEN | FLAG_USE_HTTPS_FASTOPEN);
445+
break;
446+
436447
}
437448

438449
Destroy(Token);
@@ -784,13 +795,14 @@ SetTimezoneEnv();
784795

785796
uname(&UnameData);
786797
memset(&Settings,0,sizeof(TSettings));
798+
Settings.ListenQueueLen=10;
787799
Settings.MaxLogSize=999999;
788800
Settings.MaxLogRotate=5;
789801
Settings.LogPath=CopyStr(Settings.LogPath,"SYSLOG");
790802
Settings.ConfigPath=CopyStr(Settings.ConfigPath,"/etc/alaya.conf");
791803
Settings.DefaultDir=CopyStr(Settings.DefaultDir,"./");
792804
Settings.BindAddress=CopyStr(Settings.BindAddress,"");
793-
Settings.Flags |= FLAG_KEEPALIVES | FLAG_USE_REUSEPORT | FLAG_USE_UNSHARE;
805+
Settings.Flags |= FLAG_KEEPALIVES | FLAG_USE_REUSEPORT | FLAG_USE_UNSHARE | FLAG_USE_HTTPS_FASTOPEN;
794806
Settings.DirListFlags=DIR_SHOWFILES | DIR_FANCY;
795807
Settings.AuthFlags=FLAG_AUTH_REQUIRED | FLAG_AUTH_COOKIE;
796808
Settings.AuthPath=CopyStr(Settings.AuthPath,"/etc/alaya.auth:~/.alaya/alaya.auth");

‎Settings.h

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#define FLAG_SIGHUP_RECV 65536
2424
#define FLAG_LOG_VERBOSE 131072
2525
#define FLAG_LOG_MORE_VERBOSE 262144
26+
#define FLAG_USE_FASTOPEN 524288
27+
#define FLAG_USE_HTTPS_FASTOPEN 1048576
2628

2729

2830
//Flag values for Settings->AuthFlags and Session->AuthFlags
@@ -42,6 +44,7 @@ typedef struct
4244
{
4345
int Flags;
4446
int Port;
47+
int ListenQueueLen;
4548
char *DefaultUser;
4649
char *DefaultGroup;
4750
gid_t DefaultGroupID;

‎common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "Authenticate.h"
77

88
TSettings Settings;
9-
char *Version="4.0";
9+
char *Version="4.1";
1010

1111
void SetTimezoneEnv()
1212
{

‎config.status

+6-6
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ $config_files
417417
418418
Report bugs to the package provider."
419419

420-
ac_cs_config="'--enable-ssl' '--enable-simd'"
420+
ac_cs_config="'--enable-unshare' '--enable-ssl'"
421421
ac_cs_version="\
422422
config.status
423423
configured by ./configure, generated by GNU Autoconf 2.69,
@@ -427,7 +427,7 @@ Copyright (C) 2012 Free Software Foundation, Inc.
427427
This config.status script is free software; the Free Software Foundation
428428
gives unlimited permission to copy, distribute and modify it."
429429

430-
ac_pwd='/home/colum/work/alaya'
430+
ac_pwd='/home/colum/alaya'
431431
srcdir='.'
432432
INSTALL='/bin/install -c'
433433
test -n "$AWK" || AWK=awk
@@ -496,7 +496,7 @@ if $ac_cs_silent; then
496496
fi
497497

498498
if $ac_cs_recheck; then
499-
set X /bin/sh './configure' '--enable-ssl' '--enable-simd' $ac_configure_extra_args --no-create --no-recursion
499+
set X /bin/sh './configure' '--enable-unshare' '--enable-ssl' $ac_configure_extra_args --no-create --no-recursion
500500
shift
501501
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
502502
CONFIG_SHELL='/bin/sh'
@@ -603,13 +603,13 @@ S["CC"]="gcc"
603603
S["target_alias"]=""
604604
S["host_alias"]=""
605605
S["build_alias"]=""
606-
S["LIBS"]="-lcrypt -lcrypto -lssl -lpam -lcap -lz "
606+
S["LIBS"]="-lcrypt -lcrypto -lssl -lpam -lcap -lc -lc -lz "
607607
S["ECHO_T"]=""
608608
S["ECHO_N"]="-n"
609609
S["ECHO_C"]=""
610610
S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DSTDC_HEADERS=1"\
611-
" -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBCAP=1 -DUSE_LINUX_CAPABILITIES=1 -DHAVE_LIBPAM=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPT="\
612-
"1 -DHAVE_SHADOW_H=1"
611+
" -D_FILE_OFFSET_BITS=64 -DHAVE_LIBZ=1 -DHAVE_LIBC=1 -DHAVE_LIBC=1 -DUSE_UNSHARE=1 -DUSE_PRCTL=1 -DHAVE_LIBCAP=1 -DUSE_LINUX_CAPABILITIES=1 -DHAVE_LI"\
612+
"BPAM=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPT=1 -DHAVE_SHADOW_H=1"
613613
S["mandir"]="${datarootdir}/man"
614614
S["localedir"]="${datarootdir}/locale"
615615
S["libdir"]="${exec_prefix}/lib"

‎libUseful/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CC = gcc
2-
VERSION = 4.44
2+
VERSION = 4.46
33
CFLAGS = -g -O2
44
LDFLAGS=
55
LIBS = -lssl -lcrypto -lc -lc -lc -lc -lc -lc -lc -lc

‎libUseful/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CC = @CC@
2-
VERSION = 4.44
2+
VERSION = 4.46
33
CFLAGS = @CFLAGS@ @SIMD_CFLAGS@
44
LDFLAGS=@LDFLAGS@
55
LIBS = @LIBS@

‎libUseful/OpenSSL.c

+12-3
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ int OpenSSLSetOptions(STREAM *S, SSL *ssl, int Options)
458458

459459
int DoSSLClientNegotiation(STREAM *S, int Flags)
460460
{
461-
int result=FALSE, Options=0;
461+
int result=FALSE, Options=0, i, val;
462462
char *Token=NULL;
463463
#ifdef HAVE_LIBSSL
464464
const SSL_METHOD *Method;
@@ -495,10 +495,19 @@ int DoSSLClientNegotiation(STREAM *S, int Flags)
495495
ptr=GetToken(ptr,":",&Token,0);
496496
SSL_set_tlsext_host_name(ssl, Token);
497497
#endif
498-
SSL_CTX_set_timeout (ctx, 1);
498+
if (S->Timeout > 0)
499+
{
500+
//convert centisecs to seconds
501+
val=S->Timeout / 100;
502+
if (val==0) val++;
503+
SSL_CTX_set_timeout (ctx, val);
504+
}
505+
499506
result=SSL_connect(ssl);
500-
while (result==-1)
507+
for (i=0; i < 3; i ++)
501508
{
509+
//if we succeeded don't keep looping
510+
if (result > -1) break;
502511
result=SSL_get_error(ssl, result);
503512
if ( (result != SSL_ERROR_WANT_READ) && (result != SSL_ERROR_WANT_WRITE) && (result != SSL_ERROR_WANT_CONNECT)) break;
504513
usleep(300);

‎libUseful/Socket.c

+55-24
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,51 @@
1818
#endif
1919

2020

21+
typedef struct
22+
{
23+
int Flags;
24+
int QueueLen;
25+
} TSockSettings;
26+
27+
int SocketParseConfig(const char *Config, TSockSettings *Settings)
28+
{
29+
const char *ptr;
30+
char *Name=NULL, *Value=NULL;
31+
32+
Settings->Flags=0;
33+
Settings->QueueLen=0;
34+
35+
ptr=GetToken(Config, "\\S", &Value, 0);
36+
for (ptr=Value; *ptr !='\0'; ptr++)
37+
{
38+
switch (*ptr)
39+
{
40+
case 'E': Settings->Flags |= CONNECT_ERROR; break;
41+
case 'k': Settings->Flags |= SOCK_NOKEEPALIVE; break;
42+
case 'A': Settings->Flags |= SOCK_TLS_AUTO; break;
43+
case 'B': Settings->Flags |= SOCK_BROADCAST; break;
44+
case 'F': Settings->Flags |= SOCK_TCP_FASTOPEN; break;
45+
case 'R': Settings->Flags |= SOCK_DONTROUTE; break;
46+
case 'P': Settings->Flags |= SOCK_REUSEPORT; break;
47+
case 'N': Settings->Flags |= SOCK_TCP_NODELAY; break;
48+
}
49+
}
50+
51+
ptr=GetNameValuePair(ptr, "=", "\\S", &Name, &Value);
52+
while (ptr)
53+
{
54+
if (strcmp(Name, "listen")==0) Settings->QueueLen=atoi(Value);
55+
ptr=GetNameValuePair(ptr, "=", "\\S", &Name, &Value);
56+
}
57+
58+
Destroy(Name);
59+
Destroy(Value);
60+
61+
return(Settings->Flags);
62+
}
63+
64+
65+
2166
int IsIP4Address(const char *Str)
2267
{
2368
const char *ptr;
@@ -739,40 +784,19 @@ STREAM *STREAMFromSock(int sock, int Type, const char *Peer, const char *DestIP,
739784
}
740785

741786

742-
int SocketParseConfig(const char *Config)
743-
{
744-
const char *ptr;
745-
int Flags=0;
746-
747-
for (ptr=Config; *ptr !='\0'; ptr++)
748-
{
749-
switch (*ptr)
750-
{
751-
case 'E': Flags |= CONNECT_ERROR; break;
752-
case 'k': Flags |= SOCK_NOKEEPALIVE; break;
753-
case 'A': Flags |= SOCK_TLS_AUTO; break;
754-
case 'B': Flags |= SOCK_BROADCAST; break;
755-
case 'F': Flags |= SOCK_TCP_FASTOPEN; break;
756-
case 'R': Flags |= SOCK_DONTROUTE; break;
757-
case 'P': Flags |= SOCK_REUSEPORT; break;
758-
case 'N': Flags |= SOCK_TCP_NODELAY; break;
759-
}
760-
}
761-
762-
return(Flags);
763-
}
764787

765788

766789
STREAM *STREAMServerNew(const char *URL, const char *Config)
767790
{
768791
char *Proto=NULL, *Host=NULL, *Token=NULL;
769792
int fd=-1, Port=0, Type, Flags=0;
793+
TSockSettings Settings;
770794
STREAM *S=NULL;
771795

772796
ParseURL(URL, &Proto, &Host, &Token,NULL, NULL,NULL,NULL);
773797
if (StrValid(Token)) Port=atoi(Token);
774798

775-
Flags=SocketParseConfig(Config);
799+
Flags=SocketParseConfig(Config, &Settings);
776800

777801
switch (*Proto)
778802
{
@@ -799,6 +823,11 @@ STREAM *STREAMServerNew(const char *URL, const char *Config)
799823
{
800824
fd=IPServerNew(SOCK_STREAM, Host, Port, Flags);
801825
Type=STREAM_TYPE_TCP_SERVER;
826+
if (Settings.QueueLen > 0)
827+
{
828+
listen(fd, Settings.QueueLen);
829+
if (Flags & SOCK_TCP_FASTOPEN) SockSetOpt(fd, TCP_FASTOPEN, "TCP_FASTOPEN", Settings.QueueLen);
830+
}
802831
}
803832
else if (strcmp(Proto,"tproxy")==0)
804833
{
@@ -1270,11 +1299,13 @@ int STREAMConnect(STREAM *S, const char *URL, const char *Config)
12701299
{
12711300
int result=FALSE;
12721301
char *Name=NULL, *Value=NULL;
1302+
TSockSettings Settings;
12731303
const char *ptr;
1304+
12741305
int Flags=0;
12751306

12761307
ptr=GetToken(Config, "\\S", &Value, 0);
1277-
Flags=SocketParseConfig(Value);
1308+
Flags=SocketParseConfig(Value, &Settings);
12781309

12791310
ptr=LibUsefulGetValue("TCP:Keepalives");
12801311
if ( StrValid(ptr) && (! strtobool(ptr)) ) Flags |= SOCK_NOKEEPALIVE;

‎main.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,12 @@ while (ptr)
282282
}
283283
else
284284
{
285-
Tempstr=FormatStr(Tempstr,"tcp:%s:%d",Token,Settings.Port);
286-
Config=CopyStr(Config, "F");
285+
286+
if (Settings.Flags & FLAG_USE_FASTOPEN) Config=CatStr(Config, "F");
287287
if (Settings.Flags & FLAG_USE_REUSEPORT) Config=CatStr(Config, "P");
288+
Tempstr=FormatStr(Tempstr, " listen=", Settings.ListenQueueLen);
289+
290+
Tempstr=FormatStr(Tempstr,"tcp:%s:%d",Token,Settings.Port);
288291
}
289292

290293
S=STREAMServerNew(Tempstr, Config);

‎server.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "VPath.h"
1818
#include "xssi.h"
1919
#include "icecast.h"
20+
#include <netinet/tcp.h>
2021

2122
#ifdef USE_UNSHARE
2223
#define _GNU_SOURCE
@@ -97,6 +98,9 @@ if (Settings.AuthFlags & (FLAG_AUTH_CERT_REQUIRED | FLAG_AUTH_CERT_SUFFICIENT |
9798
if (DoSSLServerNegotiation(Session->S,Flags))
9899
{
99100
Session->Flags |= HTTP_SSL;
101+
#ifndef TCP_FASTOPEN
102+
if (Settings.Flags & FLAG_HTTPS_FAST_OPEN) SockSetOpen(Session->S->in_fd, TCP_FASTOPEN, "TCP_FASTOPEN", Settings.ListenQueue);
103+
#endif
100104
return(TRUE);
101105
}
102106

0 commit comments

Comments
 (0)