]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream-int: Add src and dst addresses to the stream-interface
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Oct 2021 15:25:58 +0000 (17:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Oct 2021 09:34:21 +0000 (11:34 +0200)
commit859ff84f8ced8bf669ca001ba3ce253bba504e8c
tree46c372a9e5207faaa888799f179f002ab37a984f
parentf46e1ea1ad0c126d25a2114b66970ecbd8962eea
MINOR: stream-int: Add src and dst addresses to the stream-interface

For now, these addresses are never set. But the idea is to be able to set, at
least first, the client source and destination addresses at the stream level
without updating the session or connection ones.

Of course, because these addresses are carried by the strream-interface, it
would be possible to set server source and destination addresses at this level
too.

Functions to fill these addresses have been added: si_get_src() and
si_get_dst(). If not already set, these functions relies on underlying
layers to fill stream-interface addresses. On the frontend side, the session
addresses are used if set, otherwise the client connection ones are used. On
the backend side, the server connection addresses are used.

And just like for sessions and conncetions, si_src() and si_dst() may be used to
get source and destination addresses or the stream-interface. And, if not set,
same mechanism as above is used.
include/haproxy/stream-t.h
include/haproxy/stream_interface-t.h
include/haproxy/stream_interface.h
src/stream.c