Fix parameters to setsockopt() for TCP_FASTOPEN.

This commit is contained in:
Matthias Andree
2020-03-05 15:58:31 +00:00
committed by Simon Kelley
parent 977a5a2df1
commit e39c484ebd

View File

@@ -728,7 +728,7 @@ static int make_sock(union mysockaddr *addr, int type, int dienow)
{
#ifdef TCP_FASTOPEN
int qlen = 5;
setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen));
setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen));
#endif
if (listen(fd, TCP_BACKLOG) == -1)