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

Change-Id: I2b3b4a62c434c3a8b972d2e6bd09730e004514d0
personal/stbuehler/wip
Stefan Bühler 2 years ago
parent b006006131
commit ff500e9c8b

@ -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);

@ -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));

Loading…
Cancel
Save