haproxy/include
Valentine Krasnobaeva 5f713c03be BUG/MEDIUM: proto: fix fd leak in <proto>_connect_server
This fixes the fd leak, introduced in the commit d3fc982cd7
("MEDIUM: proto: make common fd checks in sock_create_server_socket").

Initially sock_create_server_socket() was designed to return only created
socket FD or -1. Its callers from upper protocol layers were required to test
the returned errno and were required then to apply different configuration
related checks to obtained positive sock_fd. A lot of this code was duplicated
among protocols implementations.

The new refactored version of sock_create_server_socket() gathers in one place
all duplicated checks, but in order to be complient with upper protocol
layers, it needs the 3rd parameter: 'stream_err', in which it sets the
Stream Error Flag for upper levels, if the obtained sock_fd has passed all
additional checks.

No backport needed since this was introduced in 3.0-dev10.
2024-05-21 20:14:05 +02:00
..
haproxy BUG/MEDIUM: proto: fix fd leak in <proto>_connect_server 2024-05-21 20:14:05 +02:00
import MINOR: ist: define iststrip() new function 2024-04-26 11:29:25 +02:00
make BUILD: makefile: support USE_xxx=0 as well 2024-04-11 11:06:19 +02:00