]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: create a new pool for struct sockaddr_storage
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jul 2019 16:37:02 +0000 (18:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Jul 2019 11:50:09 +0000 (13:50 +0200)
commitff5d57b02250f6c26cfb622cf253c58fed2f6a84
treeb716fa016c95735ae64394a6581537c6f77957ba
parentc0e16f208dea08504eb55d251a9b88d77e004ed3
MINOR: connection: create a new pool for struct sockaddr_storage

This pool will be used to allocate storage for source and destination
addresses used in connections. Two functions sockaddr_{alloc,free}()
were added and will have to be used everywhere an address is needed.
These ones are safe for progressive replacement as they check that the
existing pointer is set before replacing it. The pool is not yet used
during allocation nor freeing. Also they operate on pointers to pointers
so they will perform checks and replace values. The free one nulls the
pointer.
include/proto/connection.h
src/connection.c