]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: YAML: Correct `enable_proxy_protocol` value for TCP/UDP binds
authorRobert Edmonds <edmonds@users.noreply.github.com>
Tue, 10 Jun 2025 03:15:15 +0000 (23:15 -0400)
committerRobert Edmonds <edmonds@users.noreply.github.com>
Tue, 10 Jun 2025 03:15:15 +0000 (23:15 -0400)
commit31cdf2138c479984aa3269e37f0a5b89f47f75dc
tree8f17fc9527bb04fa2150c0e568f872fb4e171d91
parentd5b5916db12951436fd4c106a750205c78c1da2a
dnsdist: YAML: Correct `enable_proxy_protocol` value for TCP/UDP binds

The YAML `enable_proxy_protocol` property of `BindConfiguration` is
documented as defaulting to "true", but is actually defined to default
to false. This commit redefines this property to default to "true",
which matches the documentation. It also matches the documentation of
the `enableProxyProtocol` option to the Lua `addLocal()` function.

However, when `loadBinds()` constructs the `ClientState` for a TCP
or UDP bind, it hardcodes the last parameter (`enableProxyProtocol`)
to false, i.e. it ignores the configured value. In this commit, the
`enableProxyProtocol` parameter to the `ClientState` constructor is
taken from the corresponding value loaded by the YAML parser.
pdns/dnsdistdist/dnsdist-configuration-yaml.cc
pdns/dnsdistdist/dnsdist-settings-definitions.yml