aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--tcp_splice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcp_splice.c b/tcp_splice.c
index 8187220..49585f2 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -453,9 +453,6 @@ bool tcp_splice_conn_from_sock(const struct ctx *c,
if (!inany_is_loopback(&aany))
return false;
- if (setsockopt(s, SOL_TCP, TCP_QUICKACK, &((int){ 1 }), sizeof(int)))
- flow_trace(conn, "failed to set TCP_QUICKACK on %i", s);
-
conn->f.type = FLOW_TCP_SPLICE;
conn->flags = inany_v4(&aany) ? 0 : SPLICE_V6;
conn->s[0] = s;
@@ -463,6 +460,9 @@ bool tcp_splice_conn_from_sock(const struct ctx *c,
conn->pipe[0][0] = conn->pipe[0][1] = -1;
conn->pipe[1][0] = conn->pipe[1][1] = -1;
+ if (setsockopt(s, SOL_TCP, TCP_QUICKACK, &((int){ 1 }), sizeof(int)))
+ flow_trace(conn, "failed to set TCP_QUICKACK on %i", s);
+
if (tcp_splice_new(c, conn, ref.port, ref.pif))
conn_flag(c, conn, CLOSING);