]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: skip FD-based syscalls for FD-less connections
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 16:04:33 +0000 (18:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 17:31:47 +0000 (19:31 +0200)
commite22267971b7c1a09cfb95fba6e300d32ee01ac70
treefe3d406ba988d1ae8c8868ea4183ae5108a3aa59
parent0e9c264ca04375beb9818052843d452baa03a9be
MINOR: connection: skip FD-based syscalls for FD-less connections

Some syscalls at the TCP level act directly on the FD. Some of them
are used by TCP actions like set-tos, set-mark, silent-drop, others
try to retrieve TCP info, get the source or destination address. These
ones must not be called with an invalid FD coming from an FD-less
connection, so let's add the relevant tests for this. It's worth
noting that all these ones already have fall back plans (do nothing,
error, or switch to alternate implementation).
include/haproxy/connection.h
src/tcp_act.c
src/tcp_sample.c
src/tcpcheck.c