From: Otto Moerbeek Date: Mon, 19 May 2025 12:48:07 +0000 (+0200) Subject: dnsdist: don't try creating symlink if it already exists X-Git-Tag: dnsdist-2.0.0-alpha2~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad0ba78fb62bc3dac03c2e59a3db13493b6080f;p=thirdparty%2Fpdns.git dnsdist: don't try creating symlink if it already exists I am seeing: FileExistsError: [Errno 17] File exists: '/Users/otto/pdns/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-configuration-yaml-items-generated.cc' -> './dnsdist-rust-lib//dnsdist-configuration-yaml-items-generated.cc' after a change in dnsdist-settings-definitions.yml Plus three typos in docs. --- diff --git a/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-settings-generator.py b/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-settings-generator.py index 7a102cb11b..36af03ef46 100644 --- a/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-settings-generator.py +++ b/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-settings-generator.py @@ -377,8 +377,9 @@ void convertRuntimeFlatSettingsFromRust(const dnsdist::rust::settings::GlobalCon ''') os.rename(cxx_flat_settings_fp.name, out_file_path + '/dnsdist-configuration-yaml-items-generated.cc') - if out_file_path != build_dir_path: - os.symlink(os.path.abspath(out_file_path + '/dnsdist-configuration-yaml-items-generated.cc'), build_dir_path + '/dnsdist-configuration-yaml-items-generated.cc') + target = build_dir_path + '/dnsdist-configuration-yaml-items-generated.cc' + if out_file_path != build_dir_path and not os.path.exists(target): + os.symlink(os.path.abspath(out_file_path + '/dnsdist-configuration-yaml-items-generated.cc'), target) def generate_actions_config(output, def_dir, response, default_functions): suffix = 'ResponseAction' if response else 'Action' diff --git a/pdns/dnsdistdist/dnsdist-settings-definitions.yml b/pdns/dnsdistdist/dnsdist-settings-definitions.yml index 3a2e5acf42..00267d885d 100644 --- a/pdns/dnsdistdist/dnsdist-settings-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-settings-definitions.yml @@ -1551,14 +1551,14 @@ tcp_tuning: lua-name: "setMaxTLSNewSessionRatePerClient" internal-field-name: "d_maxTLSNewSessionsRatePerClient" runtime-configurable: false - description: "Set the maximum number of new TLS sessions, without resumption, that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ```max_tls_resumed_session_rate_per_client`" + description: "Set the maximum number of new TLS sessions, without resumption, that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ``max_tls_resumed_session_rate_per_client``" - name: "max_tls_resumed_session_rate_per_client" type: "u64" default: "0" lua-name: "setMaxTLSResumedSessionRatePerClient" internal-field-name: "d_maxTLSResumedSessionsRatePerClient" runtime-configurable: false - description: "Set the maximum number of resumed TLS sessions that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ```max_tls_new_session_rate_per_client`" + description: "Set the maximum number of resumed TLS sessions that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ``max_tls_new_session_rate_per_client``" - name: "max_read_ios_per_query" type: "u32" default: "50" diff --git a/pdns/dnsdistdist/docs/quickstart.rst b/pdns/dnsdistdist/docs/quickstart.rst index e99cb29363..5d539b7cff 100644 --- a/pdns/dnsdistdist/docs/quickstart.rst +++ b/pdns/dnsdistdist/docs/quickstart.rst @@ -146,6 +146,7 @@ Adding network ranges to the :term:`ACL` is done with the :func:`setACL` and :fu And in ``yaml`` format: .. code-block:: yaml + acl: - "192.0.2.0/28" - "2001:db8:1::/56"