]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: connection: centralize the conn_set_{tos,mark,quickack} functions
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 15:37:42 +0000 (16:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 15:41:51 +0000 (16:41 +0100)
commit1a18b54142be2eef6bed2e599c043a52ca19a813
treebd0963375eff537d3b3f3bfba3fea25c39fa9127
parent64225e1f8887e8bf8ef7759a456f2085751d4d19
REORG: connection: centralize the conn_set_{tos,mark,quickack} functions

There were a number of ugly setsockopt() calls spread all over
proto_http.c, proto_htx.c and hlua.c just to manipulate the front
connection's TOS, mark or TCP quick-ack. These ones entirely relied
on the connection, its existence, its control layer's presence, and
its addresses. Worse, inet_set_tos() was placed in proto_http.c,
exported and used from the two other ones, surrounded in #ifdefs.

This patch moves this code to connection.h and makes the other ones
rely on it without ifdefs.
include/proto/connection.h
include/proto/proto_http.h
src/hlua.c
src/proto_http.c
src/proto_htx.c