]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy_protocol: Support sending unique IDs using PPv2
authorTim Duesterhus <tim@bastelstu.be>
Fri, 13 Mar 2020 11:34:24 +0000 (12:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2020 16:26:43 +0000 (17:26 +0100)
commitcf6e0c8a836da211946fa637020e776286093633
tree5d2acd503745038a1436287286986012287fcaa1
parentd1b15b6e9b4d4d378a6169929a86f25b95eafc57
MEDIUM: proxy_protocol: Support sending unique IDs using PPv2

This patch adds the `unique-id` option to `proxy-v2-options`. If this
option is set a unique ID will be generated based on the `unique-id-format`
while sending the proxy protocol v2 header and stored as the unique id for
the first stream of the connection.

This feature is meant to be used in `tcp` mode. It works on HTTP mode, but
might result in inconsistent unique IDs for the first request on a keep-alive
connection, because the unique ID for the first stream is generated earlier
than the others.

Now that we can send unique IDs in `tcp` mode the `%ID` log variable is made
available in TCP mode.
doc/configuration.txt
include/proto/connection.h
include/types/server.h
reg-tests/connection/proxy_protocol_send_unique_id.vtc [new file with mode: 0644]
src/connection.c
src/log.c
src/server.c
src/stream_interface.c