]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: rearrange conn_get_src/dst to be a bit more extensible
authorWilly Tarreau <w@1wt.eu>
Fri, 8 Apr 2022 16:05:41 +0000 (18:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 17:33:04 +0000 (19:33 +0200)
commit987c08a5e2023ad3dffc9ff21701bc59e174d253
treed8292e91c300b7b79ec497a151a5b3ada0082f98
parent671bd5af252c8e5acd1df19384643ced4363b3c8
MINOR: connection: rearrange conn_get_src/dst to be a bit more extensible

We'll want conn_get_src/dst to support other means of retrieving these
respective IP addresses, but the functions as they're designed are a bit
too restrictive for now.

This patch arranges them to have a default error fallback allowing to
test different mechanisms. In addition we now make sure the underlying
protocol is of type stream before calling the family's get_src/dst as
it makes no sense to do that on dgram sockets for example.
include/haproxy/connection.h