From: Aurelien DARRAGON Date: Thu, 18 Jan 2024 17:51:26 +0000 (+0100) Subject: MEDIUM: tcp-act/backend: support for set-bc-{mark,tos} actions X-Git-Tag: v3.0-dev3~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42a97d9feb5e7eb46c5807b0ef41757728c7eae1;p=thirdparty%2Fhaproxy.git MEDIUM: tcp-act/backend: support for set-bc-{mark,tos} actions set-bc-{mark,tos} actions are pretty similar to set-fc-{mark,tos} to set mark/tos on packets sent from haproxy to server: set-bc-{mark,tos} actions act on the whole backend/srv connection: from connect() to connection teardown, thus they may only be used before the connection to the server is instantiated, meaning that they are only relevant for request-oriented rules such as tcp-request or http-request rules. For now their use is limited to content request rules, because tos and mark informations are stored directly within the stream, thus it is required that the stream already exists. stream flags are used in combination with dedicated stream struct members variables to pass 'tos' and 'mark' informations so that they are correctly considered during stream connection assignment logic (prior to connecting to actually connecting to the server) 'tos' and 'mark' fd sockopts are taken into account in conn hash parameters for connection reuse mechanism. The documentation was updated accordingly. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 3cb7e1a8b9..afedceef05 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -7513,9 +7513,10 @@ http-reuse { never | safe | aggressive | always } When http connection sharing is enabled, a great care is taken to respect the connection properties and compatibility. Indeed, some properties are specific - and it is not possibly to reuse it blindly. Those are the SSL SNI, source - and destination address and proxy protocol block. A connection is reused only - if it shares the same set of properties with the request. + and it is not possible to reuse it blindly. Those are the SSL SNI, source + and destination address, proxy protocol block as well as tos and mark + sockopts. A connection is reused only if it shares the same set of properties + with the request. Also note that connections with certain bogus authentication schemes (relying on the connection) like NTLM are marked private and never shared. @@ -13791,6 +13792,8 @@ sc-set-gpt X X X X X X X sc-set-gpt0 X X X X X X X send-spoe-group - - X X X X - set-bandwidth-limit - - X X X X - +set-bc-mark - - X - X - - +set-bc-tos - - X - X - - set-dst X X X - X - - set-dst-port X X X - X - - set-fc-mark X X X X X X - @@ -14701,6 +14704,42 @@ set-bandwidth-limit [limit { | }] [period { |