]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: log: handle log-forward "option host"
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 10 Mar 2025 09:02:53 +0000 (10:02 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 12 Mar 2025 09:52:07 +0000 (10:52 +0100)
commitad0133cc50f988f574415d49e9a03e6cfe45d022
treee73ed1556ddb51fcb7498714d11333df16aabf48
parent003fe530ae104189303075c19b9d405b129cd92d
MINOR: log: handle log-forward "option host"

Following previous patch, we know implement the logic for the host
option under log-forward section. Possible strategies are:

      replace If input message already contains a value for the host
              field, we replace it by the source IP address from the
              sender.
              If input message doesn't contain a value for the host field
              (ie: '-' as input rfc5424 message or non compliant rfc3164
              or rfc5424 message), we use the source IP address from the
              sender as host field.

      fill    If input message already contains a value for the host field,
              we keep it.
              If input message doesn't contain a value for the host field
              (ie: '-' as input rfc5424 message or non compliant rfc3164
              or rfc5424 message), we use the source IP address from the
              sender as host field.

      keep    If input message already contains a value for the host field,
              we keep it.
              If input message doesn't contain a value for the host field,
              we set it to localhost (rfc3164) or '-' (rfc5424).
              (This is the default)

      append  If input message already contains a value for the host field,
              we append a comma followed by the IP address from the sender.
              If input message doesn't contain a value for the host field,
              we use the source IP address from the sender.

Default value (unchanged) is "keep" strategy. option host is only relevant
with rfc3164 or rfc5424 format on log targets. Also, if the source address
is not available (ie: UNIX socket), default behavior prevails.

Documentation was updated.
doc/configuration.txt
src/log.c