MINOR: session: Add src and dst addresses to the session
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Oct 2021 13:41:57 +0000 (15:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Oct 2021 09:34:21 +0000 (11:34 +0200)
commitf46e1ea1ad0c126d25a2114b66970ecbd8962eea
tree041af78f16eb404f78b1df1d1c41a044d391e7fa
parentcc6fc26bfe796b79f5355ddd35f85e32630fb07a
MINOR: session: Add src and dst addresses to the session

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

Functions to fill these addresses have been added: sess_get_src() and
sess_get_dst(). If not already set, these functions relies on
conn_get_src() and conn_get_dst() to fill session addresses.

And just like for conncetions, sess_src() and sess_dst() may be used to get
source and destination addresses. However, if not set, the corresponding
address from the underlying client connection is returned. When this
happens, the addresses is filled in the connection object.
include/haproxy/session-t.h
include/haproxy/session.h
src/session.c