2
0
Fork 0

[core] use IPPROTO_TCP instead of SOL_TCP for TCP_FASTOPEN (#3071)

Change-Id: I2b3b4a62c434c3a8b972d2e6bd09730e004514d0
This commit is contained in:
Stefan Bühler 2021-08-08 14:34:47 +02:00
parent b006006131
commit ff500e9c8b
2 changed files with 3 additions and 3 deletions

View File

@ -628,7 +628,7 @@ static int do_listen(liServer *srv, liSocketAddress *addr, GString *str) {
}
#ifdef TCP_FASTOPEN
v = 1000;
setsockopt(s, SOL_TCP, TCP_FASTOPEN, &v, sizeof(v));
setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN, &v, sizeof(v));
#endif
if (-1 == listen(s, 1000)) {
close(s);
@ -668,7 +668,7 @@ static int do_listen(liServer *srv, liSocketAddress *addr, GString *str) {
}
#ifdef TCP_FASTOPEN
v = 1000;
setsockopt(s, SOL_TCP, TCP_FASTOPEN, &v, sizeof(v));
setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN, &v, sizeof(v));
#endif
if (-1 == listen(s, 1000)) {
close(s);

View File

@ -76,7 +76,7 @@ int li_angel_fake_listen(liServer *srv, GString *str) {
}
#ifdef TCP_FASTOPEN
v = 1000;
setsockopt(s, SOL_TCP, TCP_FASTOPEN, &v, sizeof(v));
setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN, &v, sizeof(v));
#endif
if (-1 == listen(s, 1000)) {
ERROR(srv, "Couldn't listen on '%s': %s", tmpstr->str, g_strerror(errno));